Monday, 30 November 2015

AngularJS Interview Questions and Answers for Experienced

AngularJS Interview Questions and Answers for Experienced



Question: What is AngularJS?
It is javasScript framework which is written in javascript. It is Best for Single Page Applications. It extend the html with new attributes which makes it more useful for UI Developer.


Question: In which language, AngularJS is written?
javaScript


Question: When First AngularJS was released?
2009

Question: When latest AngularJS was released?
March 31, 2017


Question: What is latest version of AngularJS?
1.6.4


Question: Who created AngularJS?
Misko Hevery started to work on AngularJS in 2009. He was employee of Google.
Question: Is it opensource?
Yes, It is free to use.



Question: Explain what are the key features of Angular.js?
  1. Scope
  2. Controller
  3. Model
  4. View
  5. Services
  6. Data Binding
  7. Directives
  8. Filters
  9. Testable



Question: From where we can download the AngularJS File?
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>



Question: What is controller in AngularJS?
Controller is constructor function in Angular Controller.
When a Controller is attached to the DOM with use the ng-controller, Angular will instantiate a new Controller object using constructor function.



Question: Explain what are directives?
Directives are used to add new attributes of HTML.



Question: What are the different types of Directive?
Different types of directives are
  1. Element directives
  2. Attribute directives
  3. CSS class directives
  4. Comment directives



Question: Explain what is injector?
An injector is a service locator, used to retrieve object instances.



Question: Explain what are factory method in angularJs?
Factory method are used to create the directive. It is invoked only once, when compiler matches the directive for the first time.



Question: Does Angular use the jQuery library?
Ans. Yes, Angular can use jQuery if you have included the jQuery library.
IF Not, Angular falls back to its own implementation of the subset of jQuery that we call jQLite.



Question: What is ng-app, ng-init and ng-model?
ng-app - To initialize the Angular Application.
ng-init - To initialize the Angular Application data.
ng-model - To bind the html tags (input, select, textarea) to Angular Application Data.



Question: What is Data Binding in Angular JS?
It is synchronization of data between the model(Angular Application variable) and view components (display with {{}}).



Question: Give an Example of Data-Binding in AngularJS?
<div ng-app="" ng-init="quantity=10;cost=5">
<b>Total Cost: {{ quantity * cost }}</b>
</div>


Question: What is Looping in AngularJs and Give an Example?
It is used to display the data in loop same as foreach in PHP
Example:
<div data-ng-app="" data-ng-init="names=['Web','Technology','Experts','Notes']">
<b>Loop Example:</b>
  <br />
<ul>
<li data-ng-repeat="x in names">
      {{ x }}
    </li>
</ul>
</div>

Question: How to Write Expression in AngularJS?
<div ng-app="">
<b>Expression: {{ 15 + 55 }}</b>
</div>



Question: How to initiate variable in AngularJS?
<div ng-app="" ng-init="quantity=10;cost=5">
<b>Total Cost: {{ quantity * cost }}</b>
</div>


OR

<div ng-app="" ng-init="quantity=1;cost=5">
<b>Total Cost: <span ng-bind="quantity * cost"></span></b>
</div>



Question: Example of AngularJS Strings?
<div ng-app="" ng-init="Str1='Web';Str2='Technology'">
Full String is : <b>{{ Str1 + " " + Str2 }}</b>
</div>




Question: Example of AngularJS Object?
<div ng-app="" ng-init="myobj={Str1:'Web',Str2:'Technology'}">
String Display: <b>{{ myobj.Str2 }}</b></div>



Question: What is Angular Controllers & give an Example?
Controller is constructor function in Angular Controller.
When a Controller is attached to the DOM with use the ng-controller, Angular will instantiate a new Controller object using constructor function.
Example:
<div ng-app="" ng-controller="StrControllerExample">
String 1: <input ng-model="str1" type="text" /><br />
String 2: <input ng-model="str2" type="text" /><br />
Full String <b> {{fullString()}}</b>
</div>
<script>
function StrControllerExample($scope) {
    $scope.str1 = "Web",
    $scope.str2 = "Technology",
    $scope.fullString = function() {
        return $scope.str1+ " " + $scope.str2;
    }
}
</script>

22 comments :

ManiVasagam M said...

Useful post...!Thank you..

clod said...

My recommendation for AngularJS editor: Codelobster

Sujeet Yadav said...

Very useful. Can you please add few important questions for 1 year experienced candidate?

Sivaram Krishna said...

Very Useful Questions, Thank you so much

Parthiban K said...

Clear description for beginners.

manjusha said...

very helpful please share few more questions

Jyothi Sowmya said...

Much useful. Thanq

Unknown said...

very nice

Thirumurugan Ponnusamy said...

very nice

Avinash said...

very nice

Anonymous said...

its nice , however not advance . basic question is there.

Anonymous said...

Thank you soooo much...

balu said...

Much useful. Thank you !!

Anonymous said...

Good questions for entry level and below one year experience..

Anonymous said...

Please help us by posting questions for 2 years experienced.

Anonymous said...

can u please add more que

Anonymous said...

i want que bank for written test for 1 year experienced. can you please post it.

raghu konda said...

Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.more 

Anonymous said...

Why viewers still use to read news papers when in this technological globe all is existing on net?

Ali Khan said...

intresting post, I hardly found useful information about jobs which contains real and useful information.find some more information hear about jobs Instagram web viewer

Ali Khan said...

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well instagram online viewer

Ali Khan said...

this website and today's post was really amazing. Now I have become a regular user of this website. Thanks for giving us so much knowledge instagram online viewer

Post a Comment