Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作为 AngularJS 的新手,我正在寻找一种方法来在被触发ng-repeat后在循环内定位元素。$(document).ready然而,他们似乎还没有准备好。谢谢你的帮助。
ng-repeat
$(document).ready
这篇博文讨论了在你的控制器中监听$viewContentLoaded事件来调用你的函数,而不是使用$(document).ready:
$viewContentLoaded
function stuffController($scope) { $scope.$on('$viewContentLoaded', readyFunction); }