简体   繁体   中英

AngularJs ng-click not working in jquery dynatable grid view

I am creating an html with ng-repeat like:

var li = '<div ng-repeat="list in viewsList">...</div>';

and then using

 var html = angular.element(li);
 angular.element("#grid-view-list").html($compile(html)($scope));

to compile my code. After this I try to create jquery dynatable, in which I am pretty successful. However, all the events like ng-click etc. in my code stop working after this.
Adding plunker .

Any suggestions or help would be great contribution.

ng-click won't work inside ng-repeat most of the times.

Because ng-repeat creates a new scope.

Please go through this link : https://github.com/angular/angular.js/wiki/Understanding-Scopes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM