This article records the usage instructions of the three modules (modal, controller, and view) of angularjs, so that beginners can learn angularjs smoothly. today, I will explain in detail the three major modules of angularjs: modal, controller, and view.
First, let's talk about the relationship between the three modules.
1. The data model (modal) mainly provides data. It does not operate directly with the view.
2. The controller saves the data provided by modal and operates with the view.
3. view is a view, that is, a page display.
4. In short, the controller is responsible for the communication between data and views, that is, the interface between the two. Their division of labor is clear and modularized.
1. How to use the data model (modal )?
Let's talk about the data model. Let's take a look at the example in the previous tutorial:
Document