Create the table in AngularJS

Table data is often repeated in natural order. In AngularJS, ng-repeat directive can be used to draw tables easily. Below is an example of how to use ng-repeat to create tables.

Table data is often repeated in natural order. In AngularJS, ng-repeat directive can be used to draw tables easily. Below is an example of how to use ng-repeat to create tables.

  Ho and Ten   Exam scores  ng-repeat = "printable version of the account.tenMonHoc" > 

To create a style for the table, you can use CSS style.

 

For example:

Below is a specific example for the directive introduced above.

 Tao state in AngularJS  src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js" > 

 

 Cavalier AngularJS  ng-app = "ungdungAngularjs" ng-controller = "sinhvienController" >  border = "0" > Nhap ho:  type = "text" ng-model = "sinhvien.ho" > Nhap ten:  type = "text" ng-model = "sinhvien.ten" > Ho and Ten: {{sinhvien.hoten ()}} Mon Hoc:   Ho and Ten   Exam scores  ng-repeat = "printable version of the account.tenMonHoc" > {{monhoc.ten}} {{monhoc.diemthi}} 

Follow tutorialspoint

Previous article: Filter in AngularJS

Next lesson: Instructions for installing AngularJS

5 ★ | 1 Vote | 👨 219 Views
« PREV POST
NEXT POST »