[英]How to call datepicker Jquery plugin in Page onload using angularjs
我有一個jquery插件,我想在頁面onload事件中調用它。 我試過下面的代碼。 有人幫助我。 謝謝。
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');
}
}]);
它應該是有angular
而不是app
:
angular.element(document).ready(function () {
document.getElementById("#req_date").glDatePicker();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.