I have a jquery plugin, I want to call this on page onload event. I have tried with below code. someone help me on this. Thanks.
var app = angular.module("myApp", []);
app.controller('MyCtrl', ['$scope', '$http', function ($scope, $http) {
app.element(document).ready(function () {
document.getElementById("#req_date").glDatePicker();
});
$scope.AddCrims = function () {
alert('hi');
}
}]);
It should be angular
not app
:
angular.element(document).ready(function () {
document.getElementById("#req_date").glDatePicker();
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.