AngularJS FAQ’s
AngularJS Online Training in Ameerpet Hyderabad
We are providing AngularJS Online Training in Ameerpet Hyderabad. We are one of best Institute to provide Best High Quality AngularJS online training all over India. The IT Professionals and Students from India and abroad who are unable to attend regular classes can attend our AngularJS online training from their home in their convenient timings. For more details on AngularJS Online Training and AngularJS FAQ’s please call to 9290971883, / 9247461324, or drop a mail to revanthonlinetraining@gmail.com
AngularJS FAQ’s
2. What is two-way binding?
Two-way binding is that when data in the view is changed the underlying model gets updated automatically and when a model from the controller is changed the view gets updated.
3. Define the features of AngularJS.
The features include are :
The Template (View)
The Scope (Model)
The Controller (Controller)
Services
Filters
Directives
4. What are AngularJS Modules?
Angular Module is place where we write code of our Angular application. Writing Modules makes our code more maintainable, testable, and readable. All dependencies for our app are defined in modules.
5. Define Data Binding.
Data binding is an automatic attunement of data between the view and model components. It contains fields that store data which is presented to the user via the template, as well as functions which can be called when the user performs certain actions such as clicking a button.
6. What is $scope?
$scope is a model for a controller and it helps the controller in interacting with the view.
7. Distinguish between AngularJS and JavaScript expressions.
There are many differences between AngularJS and JavaScript expressions:
- We can write AngularJS expressions in HTML, but we cannot write JavaScript expressions in HTML.
- Filters are supported in AngularJS whereas filters are not supported in JavaScript.We cannot use conditional iterations,
- loops, and exceptions in AngularJS, but we can use all of these conditional properties in JavaScript expressions.
8. What are the the steps to configure an Angular App(ng-app).
To set up an Angular App we must follow the following steps :
- angular.module will be created at first.
- A controller will be assigned to the module.
- The module will be linked with the HTML template(i.e. UI or View) with an angular app(ng-app).
- The HTML template will be linked with the controller(i.e JS) with an ng-controller directive.
9. What is the purpose of $rootScope?
$rootScope helps in communication between different controllers of an application. AngularJS can have only one rootScope for an app.
10. What is the main thing that we need to change if we were migrating from AngularJS 1.4 to AngularJS 1.5?
To adapt to the new AngularJS 1.5 components, we need to change .directive to .component.
11. What is Angular used for?
Angular is mainly used for the development of SPA - Single Page Applications. Angular provides a set of ready-to-use modules that simplify the development of single page applications. Not only this, with features like built-in data streaming, type safety, and a modular CLI, Angular is regarded as a full-fledged web framework.
12 What are Angular expressions?
Angular expressions are code snippets which are generally placed in binding such as {{ expression }} similar to JavaScript. These expressions are used to bind application data to HTML
Syntax: {{ expression }}
13. Is AngularJS compatible with all browsers?
Yes, AngularJS compatible with all browsers.
14. What are templates in Angular?
Templates in Angular are written with HTML that contains Angular-specific elements and attributes. These templates are combined with information coming from the model and controller which are further rendered to provide the dynamic view to the user.
15. What is ng-init used for?
Ng-init is used in a scenario where we want some action to be done before the initialization of a portion of the DOM element.
16. What are directives?
Directives are unique markers on a DOM element which tells the HTML compiler to attach a specified behavior to the DOM element. Directives start with ng-prefix. Some of the built-in directives include ngClass, ngApp, ngRepeat, ngModel, ngBind and ngInit.
17. How can we share the data between controllers in AngularJS?
First, we have to create a service, which is used to share the data between controllers in AngularJS in a very lucid, easy and fastest way. We use events, $parent, next sibling, and controller by using a $rootScope.
18. What is the digest cycle in AngularJs?
Digest is a part of the process of data binding in AngularJS. It compares the old and new versions of the scope model value in each digest cycle.
The digest cycle is triggered automatically. We can also enhance the usability by using $apply () if we want to trigger the digest cycle manually.
19. What are the binding directives in AngularJs?
The binding directives include:
- ng-bind
- ng-bind-html
- ng-bind-template
- ng-non-bindable
- ng-model
20. What is the controller in AngularJS ?
The controller is a function which generally takes an empty scope object as a parameter and adds to it the fields and functions that will be later exposed to the user via the view.
AngularJS FAQ’s
Institute address :
B1, 3rd Floor, Eureka Court, Near Image Hospital, Ameerpet, Hyderabad, India