Mayank Agarwal has Published 373 Articles

AngularJS – isUndefined() method

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 10:48:32

483 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

AngularJS – forEach() function

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 10:41:45

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

AngularJS – ng-change Directive

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 09:47:26

820 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

AngularJS – ng-keydown Directive

Mayank Agarwal

Mayank Agarwal

Updated on 08-Oct-2021 09:20:38

357 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 ... Read More

AngularJS – ng-blur Directive

Mayank Agarwal

Mayank Agarwal

Updated on 06-Oct-2021 08:31:33

637 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 ... Read More

How to convert a string into uppercase in AngularJS?

Mayank Agarwal

Mayank Agarwal

Updated on 06-Oct-2021 08:04:23

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 ... Read More

AngularJS – angular.isArray() Function

Mayank Agarwal

Mayank Agarwal

Updated on 06-Oct-2021 07:06:57

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 ... Read More

Express.js – app.METHOD() in Method

Mayank Agarwal

Mayank Agarwal

Updated on 01-Oct-2021 07:23:47

453 Views

app.METHOD() is used for mapping or routing an HTTP request where METHOD represents the HTTP method of the request such as GET, POST, PUT, etc., but in lowercase. Therefore, the methods are app.get(), app.post(), app.get(), and so on.Syntaxapp.METHOD(path, callback, [callback])Parameterspath − This is the path for which the middleware function ... Read More

Using next() function in Express.js

Mayank Agarwal

Mayank Agarwal

Updated on 01-Oct-2021 06:54:31

1K+ Views

Express.js is a powerful tool for building web servers to hit API at backend. It has several advantages which makes it popular, however it has got some drawbacks too, for example, one needs to define different routes or middleware to handle different incoming requests from the client.In this article, we ... Read More

Express.js – express.text() function

Mayank Agarwal

Mayank Agarwal

Updated on 01-Oct-2021 06:44:18

931 Views

express.text() is a built-in middleware function in Express. It parses the incoming request payloads into a string and it is based upon the body-parser. This method returns the middleware that parses all the bodies as strings.Syntaxexpress.text([options])ParametersFollowing are the different options available with this methodoptionsinflate – It enables or disables the ... Read More

Advertisements