What are directives in AngularJS?

Directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell AngularJS to attach a specified behavior to that DOM element or even transform the DOM element and its children. When AngularJS finds the directive at the time of rendering then it attaches the requested behavior to…

What are templates in AngularJS?

In Angular, templates are written with HTML that contains Angular-specific elements and attributes. Angular combines the template with information from the model and controller to render the dynamic view that a user sees in the browser. In other words, if your HTML page is having some Angular specific elements/attributes it becomes a template in AngularJS.

How does the AngularJS framework initialize itself?

The AngularJS has a self-executing anonymous function present in angular.js code, which does the initialization of AngularJS. Here is how below it looks: (function(window, document, undefined) { <!– here goes entire AngularJS code including functions, services, providers etc related code goes here –> if (window.angular.bootstrap) { //AngularJS is already loaded, so we can return here……