Open cloidjgreen opened 9 years ago
If Angular.js is loaded on the page before jQuery then the call at line 36 of directive
$element .on('dp.change', function (e) { if (ngModelCtrl) { $timeout(function () { ngModelCtrl.$setViewValue(e.target.value); }); } }) .datetimepicker(options);
blows up with
TypeError: $element.on(...).datepicker is not a function
Load order is:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
Switching load order to:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
and everything works.
Mind numbingly difficult to find, at least for my mind.
Wow, super annoying and gave me a huge headache as well. Closing my #22 as duplicate
If Angular.js is loaded on the page before jQuery then the call at line 36 of directive
blows up with
Load order is:
Switching load order to:
and everything works.
Mind numbingly difficult to find, at least for my mind.