My index.html looks like this
<script src="js/jquery-1.12.4.js"></script>
<script src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
$('dropdown-toggle').dropdown();
$( "#datepicker" ).datepicker();
});
The datepicker control works fine when I use it within the same index.html
<body ng-controller="nglsController">
..
<p>Date: <input type="text" id="datepicker"></p>
..
</body>
But, when it does not work when I embed a div which links an html file containing the same datepicker input type.
<body ng-controller="nglsController">
..
<div ng-include="marty"> </div>
..
</body>
The ng-include marty is initialized as a scope variable on click event. controller.js looks like this:
$scope.martyfun = function(inp)
{
$scope.marty = 'htmls/martyhtml.html';
}
martyhtml.html looks like this:
<form>
..
<p>Date: <input type="text" id="datepicker"></p>
..
</form>
Could you please tell me whats wrong with the second way I use datepicker?
initializefunction is into themartyhtmlfile?