1. What is AngularJS?
The ng-app directive defines an AngularJS application.
The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
The ng-bind directive binds application data to the HTML view.
2. Why to use AngularJS or what all are the advantages of angular JS?
ii)Uses the plain javascript objects
iii)A declarative user interface
iv)Filters filter the data before reaching view
v)Write less code
3. How AngularJS is different from other JavaScript Framework?
- Two way data binding
- MVC framework
- Template
- Custom-directive (reusable components)
- REST-friendly
- set up a link for any dynamic page
- Form Validation
- Server Communication
- Localization
- Dependency injection
- Full testing environment
4. What IDEs you can use for AngularJS development?
5. Compare the features of AngularJS and jQuery?
Jquery | Angular JS | |
Restful API | no | yes |
Integration test runner | no | yes |
MVC support | no | Yes |
template | no | yes |
two way of binding | no | yes |
dependency management | no | yes |
AJAX | yes | yes |
Unit test runner | yes | yes |
cross module communication | yes | yes |
form validation | no | yes |
Localization | no | yes |
file size | 32kb | 38kb |
6. Is AngularJS a library, framework, plugin or a browser extension?
7. What browsers AngularJS support?
8. What is the size of angular.js file?
9. What are AngularJS features?
1.Two way data binding
2.MVC framework
3.Template
4.Custom-directive (reusable components)
5.REST-friendly
6.set up a link for any dynamic page
7.Form Validation
8.Server Communication
9.Localization
10.Dependency injection
11.Full testing environment
10. How AngularJS handle the security?
ii)Define the service for Authorization
iii)use security in routing
11. What are Modules in AngularJS?
12. What components can be defined within AngularJS modules?
13. What is core module in AngularJS?
14. What is difference between config() and run() method in AngularJS?
The run()could be useful to perform any kind of initialization after the objects instances registered in the module have already been created.
The config() is useful to configure providers before they are actually created
15. What is Global API?
16. What is Angular Prefixes $?
17. What are Filters in AngularJS?
AngularJS filters can be used to transform data
currency – Format a number to a currency format.
filter – Select a subset of items from an array.
lowercase – Format a string to lower case.
orderBy – Orders an array by an expression.
uppercase – Format a string to upper case.
18. What are Expressions in AngularJS?
These are like JavaScript expressions: They can contain literals, operators, and variables.
19. What are Directives in AngularJS?
ng-app directive initializes an AngularJS application.
ng-init directive initializes application data.
ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
20. What is the role of ng-app, ng-init and ng-model directives?
ng-app directive initializes an AngularJS application.
ng-init directive initializes application data.
ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
21. What is restrict option in directive?
restrict: ‘E’ : The directive can appear only as HTML element
restrict: ‘A’ : The directive can appear only as HTML attribute in an element. This is the default value if restrict is not specified
restrict: ‘C’ : The directive can appear only inside a class attribute of a HTML element
restrict: ‘M’ : The directive can appear only inside a HTML comment.
22. What is bootstrap? Difference between auto bootstrap process and Manual bootstrap in AngularJS?
<link rel=”stylesheet” href=”http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css“>
23. What is scope in AngularJS?
24. What is $scope and $rootScope?
A $scope is an object that ties a view (a DOM element) to the controller. In the Model-View-Controller structure, this $scope object becomes the model
25. Explain directives ng-if, ng-switch and ng-repeat?
This directive can add / remove HTML elements from the DOM based on an expression. If the expression is true, it add HTML elements to DOM, otherwise HTML elements are removed from the DOM
ng-switch:
This directive can add / remove HTML elements from the DOM conditionally based on scope expression.
ng-repeat:
This directive is used to iterate over a collection of items and generate HTML from it.