Ng-model does not update controller value
Probably silly question, but I have my html form with simple input and button: <input type=”text” ng-model=”searchText” /> <button ng-click=”check()”>Check!</button> {{ searchText }} Then in the controller (template and controller are called from routeProvider): $scope.check = function () { console.log($scope.searchText); } Why do I see the view updated correctly but undefined in the console when … Read more