Total Pageviews

Sunday 24 February 2019

Architecture of AngularJS

AngularJs is based on MVC (Model-View-Controller) architecture. In AngularJs Model is referred to as “Scope” and View is referred as “Template” respectively.

The Controller has the business logic. Controller is a separate JS file and contains the function which triggers on user input/event and interacts with the data model objects. Controller receives the input, validates the data on the basis of business logic and then update the data model.

The View or Template is a HTML file which also contains the other AngularJs attribute, directives to modify the HTML before they are displayed on the basis of business logic from controller.

The Models or Scope are used to represent and manage the application data. It contains fields that store data which is presented to the user via the template, as well as functions which can be called on user events such as clicking a button.


Thanks :)

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. nice informative post. Thanks you for sharing.
    AngularJS is an auxiliary framework for Hybrid web applications. It gives you a chance to utilize HTML as your layout language and gives you a chance to stretch out HTML’s syntax to express your application’s components plainly and compactly.
    AngularJS Development
    Web development

    ReplyDelete

Microsoft Logo using flexbox and Reactjs

 <!DOCTYPE html> <html> <head>     <script src="https://unpkg.com/react@18/umd/react.development.js" crossori...