Do like our Facebook page or follow on Twitter for more questions.
It is said “The end justifies the beginning” ,so begin right,prepare well for the interview and crack it.
|Cracking Angular JS|
1.What is AngularJS?
AngularJS is a MVC framework used for creating single web page applications(SPA). It allows you to use HTML as your template language and enables you to extend HTML’s syntax to express your application’s components clearly. It allows to create reusable components like directives. Additionally, it has built in Unit Testing Framework
2.What are the key features of AngularJS?
- Data Binding
4.What is ng-repeat? Why we use it?
5.Can an HTML page have multiple “ng-app” directive for bootstrapping multiple AngularJS application?
It is possible to have multiple ng-app directive for bootstrapping multiple AngularJS applications.
6.What is purpose of directives in AngularJS? Explain lifecycle of directive?
7.What is the significance of filters? You can apply filters in HTML or in controller, which one hits performance?
Applying filters in HTML will execute the digest cycle multiple times. It is recommended to apply filters in controllers instead of having it directly in your HTML. Functionality wise both are same but the filter in the controller is faster and more performant.
8.What is the difference between ng-show and ng-if ?
The ngShow directive shows or hides the given HTML element based on the expression provided to the ngShow attribute. The element is shown or hidden by removing or adding the ng-hide CSS class onto the element. The .ng-hide CSS class is predefined in AngularJS and sets the display style to none (using an !important flag).
The ngIf directive removes or recreates a portion of the DOM tree based on an expression. If the expression assigned to ngIf evaluates to a false value then the element is removed from the DOM, otherwise a clone of the element is reinserted into the DOM.
9.What is purpose of ng-init?
10.What is data-binding? Explain one-way and two-way binding with example.
11.Can the angular application be initialized on only HTML element or ANY element?
It can be initialized on any element.
12.With more than one ng-app in an HTML document (an HTML page), are they automatically initialized? Describe the angularJS application initialization process with multiple ng-app in an HTML document/page.
Only one AngularJS application can be auto-bootstrapped. The first ‘ng-app’ found in the document will be used to define the root element to auto-bootstrap as an application. To run multiple applications in an HTML document, one must manually bootstrap them using angular bootstrap service.
13.What is the mechanism to share data between different controllers?
14.When and where should we use angular.element?
15.Which angular function is used to manually start up an angular application?
More interview Questions