AngularJS – Value attribute on an input text box is ignored when there is a ng-model used?

That’s desired behavior, you should define the model in the controller, not in the view.

<div ng-controller="Main">
  <input type="text" ng-model="rootFolders">
</div>


function Main($scope) {
  $scope.rootFolders="bob";
}

Leave a Comment