How to validate form data in AngularJS? |
AngularJS has enriches client-side form filling validation. It support HTML 5 validations and also allow to creationof custom validation to validate data. |
Explain the concept of Watchers, Dirty checking and Digest cycle? |
The data-bindings in AngularJS can be achieved via Watchers, Dirty checking and Digest cycle concept- |
What is dependency injection and how does it work in Angular? |
Dependency injection is a software design pattern where we inject the dependent objects rather than consumer creating the objects. |
How to make an Ajax call using AngularJS? |
AngularJS provides $http control which works as a service to make ajax call to read data from the server. The server makes a database call to get the desired records. AngularJS needs data in JSON format. Once the data is ready, $http can be used to get the data from server in the following manner: |
How do we make HTTP get and post calls in Angular? |
To make HTTP calls we need to use the “$http” service of Angular. In order to use the http services you need to make provide the “$http” as an input in your function parameters as shown in the below code. |
Explain ng-app directive? |
The ng-app directive is used to bootstrap an AngularJS application.It can also be used to declare module for an application and for initialize the angular expression variable. |
Explain ng-controller directive? |
The ng-controller directive specifies a Controller thatbind with scope to populate view from model data. |
Explain ng-model directive? |
The ng-model bind the view property by evaluating the expression on the current scope. If the property doesn't already exist on this scope, it will be created implicitly and added to the scope. |
Explain ng-click directive? |
The ng-Click directive allows you to specify custom behavior and evaluation of expression when an element is clicked. |
Explain ng-repeat directive? |
The ng-Repeat directive will repeat the instance of the element upon which it is declared for each item in a collection. There are following variable we can used with this directive |
Explain ng-show and ng-hide directive? |
The ng-Show directive shows or hides the given HTML element based on the expression provided to the ng-Show attribute. And samethe ng-Hide directive shows or hides the given HTML element based on the expression provided to the ng-Hide attribute. |