AngularJs Interview Questions and Answers Part 2

1. What is the scope of rootScope in AngularJs?
Ans. Entire Application

2. If the variable has same name in rootScope and Current Scope which one will be
preferred in AngularJs?

Ans. Its current scope.

3. Why filters are used in AngularJs?
Ans. Filters are used for formatting data.

4. Which filter is used to get subset of arrays in AngularJs?
Ans. filter type

5. Which operator is used to apply filters in ng-repeat directive in AngularJs?
Ans. pipeline operator (|)

6. Which service is used to fetch the current location of web page in AngularJs?
Ans. '$location' service

7. Which service is used to read data from web pages or remote servers?
Ans. $http service

8. What are the shortcut methods present in $http service in AngularJs?
Ans. get(),put(),patch(),post(),delete(),head(),jsonp().

9. Which format data will be in $http service response in AngularJs?
Ans. json format

10. If the property in the ng-model attribute does not exist then what happens?
Ans. AngularJS will create one for ng-model.


 






Subscribe

Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker