In AngularJS I see the way to fill an input is using a model:
<input type="text" ng-model="date">
And the model's default value is filled from JavaScript like this:
function Ctrl($scope) {
$scope.date = "2013-07-03";
}
Since in my case the default value of the model changes this means my controller would have to be in a dynamic JavaScript file but I would like to keep all JavaScript files static. How can I fill the model in the controller from the html itself? I've tried the following but it doesn't work:
<input type="text" ng-model="date" value="2013-07-03">