AngularJS – 在$(document).ready上的ng-repeat循环内定位元素
作为AngularJS的新手,我正在寻找一种在$(document).ready
被触发后在ng-repeat
循环内定位元素的方法。 然而,他们当时似乎还没准备好。 谢谢你的帮助。
这篇博客文章讨论了在控制器中监听$viewContentLoaded
事件来调用你的函数而不是使用$(document).ready
:
function stuffController($scope) { $scope.$on('$viewContentLoaded', readyFunction); }