Hi Vasanth,

The scope is NOT the viewmodel! It is just there to glue your model to the 
view and the controller. it is optional!  You can even bind your model to 
the 
view without using $scope at all. But that was not your question, so I 
won't go into that here.

The documentation on  forms <https://docs.angularjs.org/guide/forms> does a 
pretty good job explaining what you are asking
The parts that are missing in there, can be found in the ngModel 
documentation <https://docs.angularjs.org/api/ng/directive/ngModel>, and 
the ngModelController docs 
<https://docs.angularjs.org/api/ng/type/ngModel.NgModelController>
In your case, you need to pay special attention to the $parsers and 
$formatters part in the ngModelController.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to