2015-11-03 46 views
0

我有一個jquery插件,我想在頁面onload事件中調用此方法。我已經嘗試了下面的代碼。有人幫助我。謝謝。如何使用angularjs在頁面onload中調用datepicker Jquery插件

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'); 
     } 
    }]); 

回答

0

應該angularapp

angular.element(document).ready(function() { 
    document.getElementById("#req_date").glDatePicker(); 
}); 
+0

我已經改變,以角也沒有工作@michelem – Thiyagarajan

相關問題