Category Archives: AngularJs blog

Angularjs ng-disabled example


Angularjs ng-disabled example : AngularJs ng-disabled directive adds the disabled attribute in html.


Angularjs ng-disabled Example

Example

    



Enable/Disable

Try it »

Angularjs ng-disabled example

Angularjs ng-disabled example

Angularjs orderby filter example


Angularjs orderby filter example : Orderby clause is used to order the data as below:


Angularjs orderby filter Example & Syntax

OrderBy Desc Example

orderby Example : Descending

    



NameCity
{{data.id}} {{data.name}} {{data.city}}

Try it »

OrderBy Asc Example

orderby Example : Ascending

    



NameCity
{{data.id}} {{data.name}} {{data.city}}

Try it »

Angularjs currency filter example


Angularjs currency filter example : It converts the number in currency format


Syntax : Angularjs currency filter Example

Currency Example

    




Default currency is ($): {{amount | currency}}

Try it »

Angularjs currency filter example

Angularjs currency filter example

Angularjs lowercase example


Angularjs lowercase example : It converts the string in lowercase


Angularjs lowercase Example & Syntax

In Html Template

{{ expression | lowercase}}

In JavaScript

$filter('lowercase')();

Lowercase Example

    



NameCity
{{data.name | lowercase}} {{data.city | lowercase}}

Try it »

Angularjs lowercase example

Angularjs lowercase example

Angularjs uppercase example


Angularjs uppercase example : It converts the string in uppercase


Syntax : Angularjs uppercase

In Html Template

{{ expression | uppercase}}

In JavaScript

$filter('uppercase')();

Uppercase Example

    



NameCity
{{data.name | uppercase}} {{data.city | uppercase}}

Try it »

Angularjs uppercase example

Angularjs uppercase example

AngularJs Filter Example


AngularJs Filter Example : It Selects subset of array and returns as a new array


AngularJs Filter Example with Syntax

In Html Template

{{ filter_expression | filter : expression : comparator}}

In Javascript

$filter('filter')(array, expression, comparator)

array : Input array as source

expression : Can be string, Object or function used for selecting items from array.

comparator : Used to determine the actual and Expected Value.

Let us understand with very basic example and demo.

Filter Example

    



Search

NameCity
{{data.name}} {{data.city}}

Try it »

Note: Please Make you take proper ng-model name not any invalid name like : search-str Or search_str. Avoid dash, underscore and space in ng-model name.

The above example will look like this :

AngularJs Filter Example

AngularJs Filter Example

When we search the “Maya” keyword it show the result as below:

AngularJs result Filter Example

AngularJs Filter Example Result