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";
}
More Related Contents:
- Can one AngularJS controller call another?
- How to pass parameters using ui-sref in ui-router to controller
- How to set an iframe src attribute from a variable in AngularJS
- AngularJS Error: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https
- How to validate inputs dynamically created using ng-repeat, ng-show (angular)
- Losing scope when using ng-include
- How to pass parameters using ui-sref in ui-router to the controller
- What is the correct syntax of ng-include?
- Ternary operator in AngularJS templates
- angularjs to output plain text instead of html
- AngularJS – ng-disabled not working for Anchor tag
- Set active tab style with AngularJS
- AngularJS: Better way to watch for height change
- How to remove an item from an array in AngularJS scope?
- CSS: Change parent on focus of child
- Angularjs does not load scripts within ng-view
- In AngularJS, any inline javascript code that included in HTML templates doesn’t work
- Print a div using javascript in angularJS single page application
- AngularJS – placeholder for empty result from filter
- Remove ‘All Files’ option from HTML file input
- angularjs custom filter to check for values inside a data array
- Webstorm: “Cannot Resolve Directory”
- AngularJS using $rootScope as a data store
- angularjs form reset error
- AngularJs – Best-Practices on adding an active class on click (ng-repeat)
- How can I invoke encodeURIComponent from angularJS template?
- Clear localStorage on tab/browser close but not on refresh
- Rename Object Key in an array using javascript
- multiple ui-view html files in ui-router
- Decode HTML entity in Angular JS