AngularJS Model View Controller pattern MVC how Angular works

flag language

AngularJS Model View Controller pattern MVC how Angular works



AngularJS Model View Controller pattern MVC how Angular works

AngularJS applications are based on the MVC pattern. The AngularJS application development process is done using many structural elements. The basic structural elements of AngularJS are:

framework JavaScript poswojsku


Model - contains data with which the user works

In the AngularJS application, the view model - presents data transferred from the controller to the domain models view - contains data in the business domain along with operations, transformations and rules for creating, storing and operating on said data. All this is called the logic of the AngularJS application model.

The model in the AngularJS application built according to the MVC template should contain:

domain data

logic responsible for creating, modifying and managing domain data (even if it means using network services to perform remote logic) provide a clear API that provides model data and the ability to perform operations on it.

AngularJS Model View Controller pattern MVC how Angular works


AngularJS application view - is defined by expanded HTML elements, and the HTML code is generated by using directives and data attachment techniques. Views using directives are very flexible and allow the transformation of HTML elements into the basis for dynamic web applications. The view should contain: logic and markup code needed to display data to the user.


Controller - The controller is the connector between model data and views. Controllers add business domain logic (called functions) to a range that is a subset of the model.

The controller should contain:

logic required to initialize the scope

logic and functions necessary for the view to display range data

logic and functions necessary to update the scope based on user actions.

AngularJS applications also contain many other components, for example:

  • AngularJS application modules
  • AngularJS application directives
  • AngularJS application filters
  • AngularJS application factories
  • AngularJS application services

In the following parts of the guide you will see how to use the built-in AngularJS components, as well as how to create your own AngularJS components.

Angular 1:

Angular creation of a modern website JavaScript Angular framework guide

Angular store construction first product visualization guide


See in the menu similar articles to: AngularJS Model View Controller MVC pattern of how Angular works


szkolenia bezpłatne kolejne lekcje
kursy, porady, artykuły znajdziesz w Menu Tematycznym