angularjs - Using javascript change the angular formly template html -


i have below code snip.

 page.fields[{  template: '<div><img ng-click="exportcsv();"src="../login/images/excel_icon.jpg" title="export csv"/></div>',  controller: ['$scope', function (scope) {                                       scope.exportcsv = function () {                                             var __this = this;         this.fields[0].template = '<div>hello</div>';         this.fields[0] = angular.copy(this.fields[0]); 

after perform action want change template html inside function.

function cb(status) {    __this.fields[0].template = '<div>hello ankur</div>';    __this.fields[0] = angular.copy(__this.fields[3]);   }] 

it not set new template value when perform action page reflect change in template. please suggest solution.

i didn't understand much. 2 strings looks in wrong order

__this.fields[0].template = '<div>hello jiiii</div>'; __this.fields[0] = angular.copy(__this.fields[3]); 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -