What do you understand by validation of data in AngularJS?

AngularJS enriches form filling and validation. AngularJS provides client-side form validation. It checks the state of the form and input fields (input, text-area, select), and notify the user about the current state. It also holds the information about whether the input fields have been touched, or modified, or not. There are following directives that can … Read more

What do you understand by Dependency Injection in AngularJS?

Dependency Injection (also called DI) is one of the best features of AngularJS. It is a software design pattern where objects are passed as dependencies rather than hard coding them within the component. It is useful for removing hard-coded dependencies and making dependencies configurable. To retrieve the required elements of the application that need to … Read more

Explain Currency filter in AngularJS. How can we use it?

The currency filter contains the “$” Dollar symbol as default. We can apply the following code as the html template format of Currency Filter. {{ currency_expression | currency : symbol : fractionSize}} We can use Currency Filter by using the following methods: Default If we do not provide any currency symbol, then Dollar sign will … Read more

Explain custom filters with an example.

We can create our own filters in AngularJS. It can be performed by associating the filter to our module. These types of filters are known as custom filters. An example given below can be used to count the number of elements in the string by using the filter: angular.module(‘myCountFilterApp’, []) .filter(‘count’,function() { return(function(input) { var … Read more

What is a template in AngularJS?

A template consists of HTML, CSS, and AngularJS directives, which are used to render the dynamic view. It is more like a static version of a web page with some additional properties to inject and render that data at runtime. The templates are combined with information coming from model and controller. In AngularJS, a template … Read more