How to set focus on input field automatically on page load in AngularJS ?
We can focus on any input field automatically using the angular directives. Here we create a custom directive that can auto-focus on any field in the form....
read more
AngularJS ng-model Directive
The ngModel directive is a directive that is used to bind the values of the HTML controls (input, select, and textarea) or any custom form controls, and stores the required user value in a variable and we can use that variable whenever we require that value. It also is used during form validations. The various form input types (text, checkbox, radio, number, email, URL, date, datetime-local time, month, week) can be used with the ngModel directive. This directive is supported by <input>, <select> & <textarea>....
read more
AngularJS ng-disabled Directive
In this article, we will see the AngularJS ng-disabled Directive, along with understanding its implementation through the illustrations....
read more
Angular forms NgModel Directive
In this article, we are going to see what is NgModel in Angular 10 and how to use it. NgModel is used to create a top-level form group Instance, and it binds the form to the given form value....
read more
Angular 7 | Directives
Directives in Angular 7 are Typescript class which is declared with decorator @Directive. These are the Document Object Model (DOM) instruction sets, which decide how logic implementation can be done.Angular directives can be classified into three types:...
read more
Angular FormsModule Directive
In this article, we are going to see what is FormsModule in Angular 10 and how to use it....
read more
AngularJS ng-checked Directive
The ng-checked Directive in AngularJS is used to read the checked or unchecked state of the checkbox or radio button to true or false. If the expression inside the ng-checked attribute returns true then the checkbox/radio button will be checked otherwise it will be unchecked....
read more
AngularJS ng-pattern Directive
The ng-pattern Directive in AngularJS is used to add up pattern (regex pattern) validator to ng-Model on an input HTML element. It is used to set the pattern validation error key if input field data does not match a RegExp that is found by evaluating the Angular expression specified in the ng-pattern attribute value....
read more
Angular forms NgForm Directive
In this article, we are going to see what is NgForm in Angular 10 and how to use it. NgForm is used to create a top-level form group Instance, and it binds the form to the given form value....
read more
What is the difference between change and ngModelChange in Angular?
change: The change event is fired for <input>, <select>, and <textarea> elements when an alteration to the element’s value is committed by the user.The change event is not necessarily fired for each alteration to an element’s value. change is a DOM event that is it can trigger changes in HTML tags and elements....
read more
Angular forms FormControlName Directive
In this article, we are going to see what is FormControlName in Angular 10 and how to use it....
read more
AngularJS ng-init Directive
The ng-init Directive is used to initialize AngularJS Application data. It defines the initial value for an AngularJS application and assigns values to the variables. The ng-init directive defines initial values and variables for an AngularJS application....
read more