Angularjs Interview Questions And Answers Pragimtech

44) Explain the concept of webpack

Webpack is a module bundler for Angular2 or above. It bundles, transpiles, and minifies AngularJS application.

69) Explain parameterized pipe in AngularJS

In angularJS, pipes can have more than one parameter in order to tune the fine output. You can create a parameterized pipe by declaring the pipe with colon(:) and values of parameter. Developer can separate multiple parameter values with colon(:).

Routing is a method of merging various views. The controller takes the decision to combine these views depend on logical needs.

26) What is ng-non-bindable in AngularJS?

Ng-non-bindable specifies AngularJs to not compile the HTML element and its child nodes. For example:

60) What are templates in AngularJS?

A template is HTML file that is used with AngularJs directives and attributes.

17) What is the factory function in AngularJS?

For creating the directive, factory method is used. It is invoked only once when the compiler matches the directive for the first time. By using $injector.invoke the factory method is invoked.

7) What are directives? Name some of the most commonly used directives in AngularJS application

A directive is something that introduces new syntax. They are like markers on the DOM element, which attaches a special behavior to it. In any AngularJS application, directives are the most important components.

Some of the commonly used directives are:

49) What is the digest cycle in AngularJS?

Digest cycle is important part of the data binding in AngularJS, which compares the old and new version of the scope model. Digest cycle triggered automatically or manually by using $apply() function.

22) Explain the main difference between AngularJS and backbone.js

AngularJS Backbone.js
AngularJS is a JavaScript-based open-source framework which is designed to support dynamic web applications. backbone.js is a framework which abstracts DOM into views and data into models and then binds both using events.
It’s performance is good as it provides two-way data binding process Backbone.js technology offers faster performance than AngularJS if the data sets are small
It works on MVS (Multiple Virtual Storage). It works on MVP architecture.
AngularJS uses dynamic HTML attribute to make an easy to understand the application. Backbone.js uses underscore templates to understand the application.
It has large community support. Community support is restricted to the underscore template.

AngularJS was developed by Adam Abrons and Misko Hevery. Currently, it is developed by Google.

24) How can you integrate AngularJS with HTML?

Developers can follow the following steps to integrate AngularJS with HTML:

Step 1: including AngularJS JavaScript in html page.

Step 2: Point out AngularJS application.

You have to add ng-app attribute inside HTML body tag to tell what part of HTML AngularJS app has as shown in the following example:

65) What is transclusion in AngularJS?

The transclusion in AngulaJS enables developers to reallocate the original directive children into a specific location within a template. The directive ng shows the insertion point for a transcluded DOM of the nearest parent directive, which is using transclusion. Ng-transclude-slot or ng-transclude directives are mainly used for transclusion.

43) What is a single page application in AngularJS?

SPA or single page application is a website or web application which interacts with the users dynamically. In AngularJS, JavaScript, HTML, and CSS fit on a single page. It performs navigation without refreshing the whole HTML page.

35) What are the common Angular Global API functions

Some commonly used Angular Global API functions are:

  • Angular.isString: It will return true only if the given reference is of type string.
  • Angular.lowercase: It converts any string to lowercase
  • Angular.uppercase: It converts any string to uppercase.
  • Angular.isNumber: It returns true only if the reference is a numeric value or number.
  • Most asked 16 AngularJS Interview Questions and Answers

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *