In this article, let's gradually find out why angular is so popular:
Angular. js is a MV * Model-View-Whatever. Whether it is MVC or MVVM, it is integrated with the model Drive View JavaScript framework. It is the SPAsingle-page-application launched by Google) application Framework, which adds a lot of magic changes to our web application development.
I can spend the whole day telling you why you have to try angular. js in a new project, but I think it's still a bit difficult to say.
Data Binding and scopes (Scope)
The first question that emerges first is: does angular support data binding?
Next let's take a look at angular. js Data Binding:
Edit in plucker
?
<body ng-app> <span>Insert your name:</span> <input type= "text" ng-model= "user.name" /> </body>
|
In this code snippet, before explaining the details, I still want to try the following:
Note: Do not worry too much about ng-app at the moment.
As you can see, what I input in input will be displayed in the back echo. How does this work? In short, angular ng-model (