O'Reilly logo
  • shashank reddy thinks this is interesting:

Notice that we did not declare a user object in the controller (that is, self.user = {}). When you use ng-model, AngularJS automatically creates the objects and keys necessary in the chain to instantiate a data-binding connection. In this case, until the user types something into the username or password field, there is no user objec


Cover of AngularJS: Up and Running


ng-model no instantiation