2
我使用ng-repeat
數據加載到表中。
有一個onFinishRender
,它發出ngRepeatFinished
。但它並沒有被解僱。
爲什麼它不工作的任何想法?
logsmgr.directive('onFinishRender', function ($timeout) {
showLog("onFinishRender");
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeout(function() {
scope.$emit('ngRepeatFinished');
});
}
}
}
});
您是否忘記將指令添加到您的某個元素? – Bert 2015-02-23 21:57:18