angularjs - Angular, ng-init doesn't initialize -



angularjs - Angular, ng-init doesn't initialize -

trying initial text box ng-init text box blank?

<form ng-app="theapp" ng-init="email='test@test.com'"> <div> <label>email: </label> &nbsp;<input type="text" ng-model="email"> </div> </form>

i don't know if you're starting angular correctly. dropping ="theapp" makes work. see fiddle.

in app.js, defining angular module theapp? i.e. angular.module('theapp', [])

<form ng-app ng-init="email = 'test@test.com'"> <div> <label>email: </label> &nbsp;<input type="text" ng-model="email"> </div> </form>

angularjs angularjs-directive

Comments

Popular posts from this blog

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -