Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How AngularJS is compiled?

Answer Posted / chaitanya

Angular's HTML compiler allows you to teach the browser new HTML syntax. The compiler allows you to attach new behaviors or attributes to any HTML element. Angular calls these behaviors as directives.

AngularJS compilation process takes place in the web browser; no server side or pre-compilation step is involved. Angular uses $compiler service to compile your angular HTML page. The angular' compilation process begins after your HTML page (static DOM) is fully loaded. It happens in two phases:

1. Compile - It traverse the DOM and collect all of the directives. The result is a linking function.

30

www.webgeekschool.com www.dotnet-tricks.com

To Join .NET, ASP.NET MVC, WCF, AngularJS, Mobile Development Training Programs - Call Us : +91-9871749695

2. Link - It combines the directives with a scope and produces a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model.

The concept of compile and link comes from C language, where you first compile the code and then link it to actually execute it. The process is very much similar in AngularJS as well.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How angular apps prevent this attack?

842


Is ngmodel deprecated?

810


What mean by topology?

759


How to access the angular $scope variable in browsers console?

872


What are annotations in angular?

751


Is mvc a framework?

739


What is xmb placeholders?

755


What is the use of systems? How is webpack better to use in angular?

791


Explain the steps for creating a services in angular 2?

774


What is Data Binding? How Many Types Of Data Binding Directives Are Provided By AngularJS?

856


What are the new features in angular 6?

863


What does ‘ng-serve’ do?

807


Explain what the link function is and how it differs from compile?

811


What are decorators in angular?

733


What is the difference between a link and compile in angularjs?

816