AngularJS Articles

Page 5 of 5

AngularJS – isString() method

Mayank Agarwal
Mayank Agarwal
Updated on 08-Oct-2021 360 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 your Angular project directory and copy-paste the following code snippet.           angular.isString()                                    Welcome to Tutorials Point             ...

Read More

AngularJS – ng-change Directive

Mayank Agarwal
Mayank Agarwal
Updated on 08-Oct-2021 905 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 the key).Note − This directive also requires ngModel to be present.Syntax..Content..Example − ngChange DirectiveCreate a file "ngChange.html" in your Angular project directory and copy-paste the following code snippet.           ngChange Directive                   ...

Read More

AngularJS – ng-keydown Directive

Mayank Agarwal
Mayank Agarwal
Updated on 08-Oct-2021 412 Views

The ng-keydown directive in AngularJS basically specifies a custom event on pressing the key. We can perform multiple functions whenever the keydown event is called. This event also supports different types of elements like , and .Syntax..content..Example − ngKeydown DirectiveCreate a file "ngKeydown.html" in your Angular project directory and copy-paste the following code snippet.           ngKeydown Directive                            .keyDown {             background-color: blue;             color: white; ...

Read More

AngularJS – ng-blur Directive

Mayank Agarwal
Mayank Agarwal
Updated on 06-Oct-2021 691 Views

The ng-blur Directive in AngularJS is fired when an element loses focus from that element. The blur event is executed synchronously along with the DOM manipulations (like removing from the focus point).AngularJS also executes the expression using scope.$evalAsync if the event is fired during an $apply to ensure the consistent application state.Syntax..Content..Example 1 − ng-blur DirectiveCreate a file "ngBlur.html" in your Angular project directory and copy-paste the following code snippet.           ngBlur Directive                              Welcome to Tutorials Point ...

Read More

How to convert a string into uppercase in AngularJS?

Mayank Agarwal
Mayank Agarwal
Updated on 06-Oct-2021 1K+ Views

Sometimes we may need to represent a name or a string in capital letters. To convert a string into uppercase in AngularJS, we can use the uppercase filter to change its case to uppercase.SyntaxIn HTML Template Binding{{uppercase_expression | uppercase}}In JavaScript$filter('uppercase')()Example − Conversion to Upper CaseCreate a file "uppercase.html" in your Angular project directory and copy-paste the following code snippet.    uppercase Filter               Welcome to Tutorials Point               AngularJS | UpperCase Filter                 ...

Read More

AngularJS – angular.isArray() Function

Mayank Agarwal
Mayank Agarwal
Updated on 06-Oct-2021 2K+ Views

The angular.isArray() function in AngularJS basically checks if a reference is an Array or not. This method will return True if the reference passed inside the function is an Array type, else it will return False.Syntaxangular.isArray(value)Example − Check if the reference is an Array or notCreate a file "isArray.html" in your Angular project directory and copy-paste the following code snippet.           angular.isArray()                              Welcome to Tutorials Point             AngularJS | angular.isArray()       ...

Read More
Showing 41–46 of 46 articles
« Prev 1 2 3 4 5 Next »
Advertisements