Sunday, July 26, 2015

Angular JS Interview Questions and Answers


What is Angular JS ?

Angular JS is Client side open source JavaScript framework to create SPA applications. Its written in JavaScript.

Is AngularJS a library, framework, plugin or a browser extension?

AngularJS  is framework

Is Angular JS is cross-browser compatible?

Yes

What is ng-repeat?

It is directive used to iterate the collection/

What is $http?

It is useful for communicating with remote servers.

Various  Filters in Angular JS

currency
filter
lowercase
orderBy

uppercase

How to write AngularJS Expressions


AngularJS expressions are created using {{ expression }}.

What is $scope?

$Scope is glue between View and Controller

How to Include HTML files in Angular JS Application?

Using ng-include directive

What is $RouteProvider 

It wil be is used to configure the routes. We use the module’s config() to configure the $routeProvider

What is a scope in AngularJS?

scope is an object that refers to the application model. It is the glue between application controller and the view. Both the controllers and directives have reference to the scope, but not with each other. It is an execution context for expressions and arranged in hierarchical structure. Scopes can watch expressions and propagate events.

What is Routing?  How to Create it in AngularJS?

AngularJS routes enable you to create different URLs for different content in your application. 


How will you show/hide buttons and enable/disable buttons conditionally?

Using the ng-show and ng-disabled directives.

How will you loop through a collection and list each item?

Using the ng-repeat directive.


How to enable and disable buttons with using condition?

Using ng-disabled


What are the advantages of using Angular JS framework ?


Supports two way data-binding
Supports MVC pattern
Support static template and angular template
Can add custom directive
Supports REST full services
Supports form validations
Support both client and server communication
Support dependency injection
Applying Animations
Event Handlers

No comments:

Post a Comment