我使用progressbarwars.js
插件ID属性以表达式作为字符串中的jQuery插件
<--- <prog-bar id="{{goal.id}}" value="{{(((goal.amount-goal.pending)/goal.amount)*100)}}"></prog-bar> --->
这是自定义指令,我已经使用
var goal_progress=attrs.value;
$element.ProgressBarWars({porcentaje:goal_progress});
,这是怎么了调用该插件
但插件是使用id属性并附加它与一个共同的字符串,以提供id由新插入的div元素..
但问题是内部的插件的属性值来了作为字符串 如.. #bar{{goal.id}}
随着AngularJS框架中,DOM操作只能从[directives](https://docs.angularjs.org/guide/directive)完成。 jQuery插件的使用应封装在[自定义指令](https://docs.angularjs.org/guide/directive)中。 – georgeawg