How to eval an attribute as string which is a custom function using Angular 1.5 component?
问题 I'm using Angular 1.5. I created a menu which is a component. The menu component accept as attribute a list of jsonObject to create each menuitem. <comp-menu items="menuitems" ></comp-menu> A menuitem is a component as well. I would like to add an attribute like "action" which would be a custom function as an evaluated string in data-ng-click... of this kind : <comp-menuitem data-ng-repeat="item in items" data-ng-click="eval({{item.action}})"></comp-menuitem> The data can be like in my