Home  >  Article  >  Web Front-end  >  A brief introduction to the working mechanism of angular

A brief introduction to the working mechanism of angular

小云云
小云云Original
2018-03-05 10:54:561122browse

This article mainly introduces the working mechanism of angular to you briefly, hoping to help you.

The working mechanism of angular
1.Load html and then parse it into DOM;
2.Load angular.js Script;
3. AngularJS waits for the DOMContentLoaded event to be triggered;
4. AngularJS looks for the ng-app directive and determines the boundaries of the application based on this directive;
5.Configure $injector using the module specified in ng-app;
6.Use

compile service and $rootScope;
7.Use

## on rootScope ;


8. The ng-init instruction assigns a value to the variable name in the scope;
9.Replace the expression {{name}}, so, Displayed as "Hello World!"

Related recommendations:


The working mechanism of the ready function in jQuery

Detailed explanation of the working mechanism of the Javascript engine

Detailed explanation of the differences between AngularJS, Angular 2, and Angular4

The above is the detailed content of A brief introduction to the working mechanism of angular. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn