Loading jQuery after AngularJS
This question already has an answer here:
Inside your angular controller corresponding to that view, you can do the following:
.controller('MyCtrl', [function($scope) {
$scope.$on('$viewContentLoaded', function(){
// here your jQuery code
});
}]);
Few precisations: angular already has its builtin version of jQuery (jQlite) and you should use jQlite instead of jQuery every time that is possible. Moreover, you should avoid to use jQlite/jQuery snippets inside controllers and I am pretty sure that there is some "angularjs solution" which is more appropriate for your case.
链接地址: http://www.djcxy.com/p/3922.html下一篇: 在AngularJS之后加载jQuery