Tuesday 3 January 2017

Experienced AngularJS Interview Questions and Answers pdf

List of AngularJS interview questions to help you prepare for your AngularJS technical interview, Read the most frequently asked 100 top AngularJS Interview Questions and Answers for freshers and experienced pdf

AngularJS Interview Questions and Answers List

31. Does Angular use the jQuery library?
 YES, Angular can use jQuery if it's present in your app when the application is being bootstrapped. If jQuery is not present in your script path, Angular falls back to its own implementation of the subset of jQuery that we call jQLite.

32. Why AngularJS?
 AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
    MVC implementation is done right.
    It extends HTML using directives, expression and data binding techniques to define a powerful HTML template.
    Two way data-binding, form validations, routing supports, inbuilt services.
    REST friendly.
    Dependency injection support.
    It helps you to structure and test your JavaScript code.

33. What are the key features/concepts of Angular.js?
 When you start learning AngularJS, you will come across following terms and these are the features/concept of AngularJS.
    Scope
    Directives
    Expression
    Filters
    Data Bindings
    Model
    View
    Controller
    Modules
    Services
    Dependency Injection

34. Is AngularJS is compatible with all modern browsers?
 YES. AngularJS team run extensive test suite against the following browsers: Safari, Chrome, Firefox, Opera 15, IE9 and mobile browsers (Android, Chrome Mobile, iOS Safari).

35. What is the basic need to start with AngularJS?
 To start with AngularJS, one need to make reference of angular.js. The latest version of AngularJS can be downloaded from AngularJS.com. You can either download the required js file and then host them locally or you can also use google CDN for referencing it. Here is the link for google CDN url for referencing AngularJS.

36. 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...
    console.log('WARNING: Tried to load angular more than once.');
    return;
  }
  //try to bind to jquery now so that one can write angular.element().read()
  //but we will rebind on bootstrap again.
  bindJQuery();
  publishExternalAPI(angular);
  jqLite(document).ready(function() {
    angularInit(document, bootstrap);
  });
})(window, document);
Above function first check if Angular has already been setup. If it has, we return here to prevent Angular from trying to initialize itself a second time. And then it binds jQuery (if present) and publish external API. And finally angularInit() method does the trick for initialization of AngularJS.

Following articles are recommended to know in detail.
How AngularJS Works – Explained with Angular Code
Dissecting Angular: Initializing An App

37. What is the bootstrapping in AngularJS?
 Bootstrapping in AngularJS is nothing but just initializing, or starting, your Angular app. AngularJS supports automatic bootstrapping as well as manual way as well.

38. 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.

39. 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 the DOM element. Angular comes with a set of these directives built-in, like ngBind, ngModel, and ngClass.

40. Can we create our own directives?
 YES. AngularJS allows us to create our own custom directive.

2 comments:

  1. Hi Buddy,
    Love it absolutely! So crystalline. No mumbo jumbo. No non-sense. Straight and simple. You guys need a standing ovation for your good work.
    For definition :-
    https://angular-2-training-book.rangle.io/handout/state-management/ngrx/

    For Use :-

    https://www.toptal.com/angular-js/ngrx-angular-reaction-application
    http://onehungrymind.com/build-better-angular-2-application-redux-ngrx/
    https://blog.angular-university.io/angular-2-redux-ngrx-rxjs/


    Appreciate your effort for making such useful blogs and helping the community.


    Thanks,

    ReplyDelete

  2. This post will be very useful to us....i like your blog and helpful to me....
    Hire Remote Angularjs Developer in India

    ReplyDelete