我正在尝试制作一些可重复使用的倒计时小工具.适用于静态内容,但是当我试图动态添加它们时,我的指令不理解ngRepeat中的变量.
标记:
<div ng-repeat="cdn in countdowns" class="countdown" countdown-end="{{cdn}}"> <p ng-hide="over">{{days}} jours {{hours}} heures {{minutes}} min {{seconds}} sec</p> <p ng-show="over">Done</p> </div>
指示:
... link: function(scope,elm,attrs) { scope.days = '1'; ... } ...
谢谢你的回复.