MVC structure in AngularJS
Model View Controller or MVC is a popular call, a software design model for web-based applications.
Model View Controller or more commonly known as MVC, is a software design model for web-based applications. A Model View Controller is made up of 3 main parts:
- Model - The lowest component of the model is responsible for maintaining data.
- View - Is responsible for displaying the data to the user.
- Controller - Is the Code section that controls the interaction between Model and View
MVC is more popular because it separates the application logically between the user interface layer and supporting related parts. The controller part receives all requests for the application and then works with the model part to prepare the data for the view. The view uses the data prepared by the controller and then creates the data seen by the user.
- Model component in AngularJS: Model component for data management task. It responds to requests from the view and executes commands from the controller to update values for itself.
- The View component in AngularJS: Is the component that displays the data in a specific format, triggered by the controller section to display the data.
- Controller component in AngularJS: Controller component interacts with user data and executes changes on model object. The controller part takes the input parameters, makes the parameters take effect, then performs logic operations in which the model data state can be changed.
AngularJS is a working framework based on MVC model. In the following chapters, we will see how AngularJS uses the MVC method.
According to Tutorialspoint
Previous lesson: Instructions for installing AngularJS
Next lesson: Create the first AngularJS application
You should read it
- Instructions for installing AngularJS
- View components in AngularJS
- What is AngularJS?
- The Service in AngularJS
- Directive in AngularJS
- The Filter in AngularJS
- The Module in AngularJS
- Ajax in AngularJS
- Form in AngularJS
- Controller component in AngularJS
- HTML DOM element in AngularJS
- Create the first AngularJS application
Maybe you are interested
In the future, scientists will use crystals to encode information The most unique images on the plane that passengers have ever taken: Bet you have not seen more than half! How to equalize line, column, and cell sizes in Excel Thai cosplay god re-export the net again and laugh 8 tips to help you get a good night's sleep on the plane 5 familiar but dirty items on the plane