I am new to AngularJS and do have the task of enhancing existing code.
Simplified, the following is in the html-file:
<div class="popup-list" ng-controller="NumberCtrl">
First number: <input type="number" ng-init="$scope.firstNum">
</div>
And this I want to have referred in a JavaScript-file:
angular.module('app').controller('NumberCtrl', function ($scope)
{
$scope.firstNum = 100
});
However the modal window popups up providing the input field, but no value = 100 is pre-defined.
What is going wrong here?
ng-modelinstead ofng-initwhich provides you two way binding feature..