Explain the compilation process of AngularJS?

Angular’s HTML compiler allows us to teach the browser, new HTML syntax. It also allows the developer to attach new behavior or attributes to any HTML element known as directives. AngularJS compilation process automatically takes place in the web browser. It does not contain any server-side or pre-compilation procedure. AngularJS uses <$compiler> service for the … Read more

What are the different types of directives available in AngularJS?

AngularJS provides support for creating custom directives for the following type of elements: Element Directive Element directives are activated when a matching element is encountered. Attribute Attribute directives are activated when a matching attribute is encountered. CSS CSS directives are activated when a matching CSS style is encountered. Comment Comment directives are activated when a … Read more

What do you understand by $watch?

In angularJS, $watch() function is used to watch the changes of variable in $scope object. Generally, the $watch() function is created internally to handle variable changes in the application. If there is a need to create custom watch for some specific action then it’s better to use $scope.watch function. The $scope.watch() function is used to … Read more

How will you explain Manual Bootstrap Process in AngularJS?

Sometimes, we may need to manually initialize the Angular application to have more control over the initialization process. We can perform such task using angular.bootstrap() function within angular.element(document).ready() function. AngularJS uses this function when the DOM is ready for manipulation. The angular.bootstrap() function uses two parameters, the document, and the module name injector. In AngularJS, … Read more

How will you explain Auto Bootstrap Process in AngularJS?

AngularJS initializes automatically upon the “DOMContentLoaded” event. It also initializes when the browser downloads the Angular.js script and document.readyState is set to ‘complete’ at the same time. AngularJS looks for an ng-app directive which is the root of Angular application compilation process. If the directive ‘ng-app’ is found, then AngularJS will perform the following steps: … Read more