- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mayank Agarwal has Published 380 Articles
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
345 Views
The ngMaxlength Directive in AngularJS adds the maxlength validator to the ngModel. This directive is mostly used to control the text-based inputs but can also be applied for controlling the custom text-based controls.This validator sets the maxlength error key if the value ngModel.$viewValue is longer than the integer value obtained ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
676 Views
The ng-style Directive in AngularJS helps you to set the CSS style of an HTML element conditionally. If the condition evaluates to True, the style will be applied. The expression inside the ng-style directive must be an object. This is supported by all the HTML elements.Syntax..content..Example − ngStyle DirectiveCreate a ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
221 Views
The ngHref Directive in AngularJS solves the problem of replacing the markup when the link is broken which thus leads the system to return a 404 error. Instead of using markup like {{hash}} in an href attribute which will change or replace the markup value, we should use the ngHref ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
141 Views
The ngSelected Directive in AngularJS sets the selected attribute element on the element to True. We can also write an expression inside the ngSelected with the only condition that it should evaluate to True.This special directive is necessary since interpolation cannot be used inside the selected attribute.Syntax..content..Example − ngSelected DirectiveCreate ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
458 Views
The ngSwitch directive in AngularJS conditionally swaps the DOM structure on the template based upon the scope expression. This directive can be used for showing or hiding elements based upon the switch cases.The HTML elements will be displayed only if the expression inside the ngSwitch directive evaluates to True, else ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
479 Views
The isObject() method in AngularJS basically checks if a reference is an Object or not. This method will return True if the reference passed inside the function is an Object, else it will return False.Note − NULL values are not considered as an Object, but JavaScript arrays are objects.Syntaxangular.isObject(value)Example − ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
214 Views
The isString() method in AngularJS basically checks if a reference is a string value or not. This method will return True if the reference passed inside the function is a string, else it will return False.Syntaxangular.isString(value)Example − Check if the reference is a String or notCreate a file "isString.html" in ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
363 Views
The isUndefined() method in AngularJS basically checks if a reference is defined or not. This method will return True if the reference passed inside the function is not defined or undefined, else it will return False.Syntaxangular.isUndefined(value)Example − Check if the reference isUndefined or notCreate a file "isUndefined.html.3" in your Angular ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
5K+ Views
The forEach() function in AngularJS uses the Iterator object to iterate over the collection of items or objects or an array. The iterator function is called with the iterator object(value, key, obj) where, value represents the object property or an array element, key specifies the object property key or array ... Read More
![Mayank Agarwal](https://www.tutorialspoint.com/assets/profiles/333719/profile/60_290052-1619507248.jpg)
Mayank Agarwal
655 Views
The ng-change directive in AngularJS evaluates a given expression whenever the user changes the input. On every change, the ngChange directive is fired and the expression is evaluated immediately. The JavaScript onChange event only triggers at the end of a change (when the user leaves the form element or presses ... Read More