Search example
Showing posts with label ng-class. Show all posts
Showing posts with label ng-class. Show all posts

Angularjs table format example

 Angularjs table format example

Requirement:
Have a list customers, show customer information (name, age, gender, phone) as a table.
To make discern base on gender: if gender = 'girl' then textcolor will be green
To make discern base on age: if age <20 background of age cell will be blue (is teen)

                                                if age >60 background of age cell will be gray(is old)

As same as following image

Here is full code, please focus at highlight chars.

Tutorial 19 – how to use ng-class in angularjs

How to use ng-class in angularjs?

This sample will help you know about using ng-class in AngularJS. You will like this directive after you run ng-class example as below.



Popular Posts