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.

  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

May be interested

  • HTML DOM element in AngularJSHTML DOM element in AngularJS
    the directives below can be used to bind application data to attributes in the html dom element.
  • Multilingual (i18n) in AngularJSMultilingual (i18n) in AngularJS
    angularjs provides multi-lingual functions (i18n) with 3 types of filters, currency, date and number. we just need to combine the js corresponding to the location depending on the country. by default it will attach to the location in the web browser.
  • Expression in AngularJSExpression in AngularJS
    expression is used to bind application data to html tags. expression is written in {{expression}}. expression has a similar way of operating as the ng-bind directive.
  • Create automatic table of contents in Word 2003Create automatic table of contents in Word 2003
    creating an automatic table of contents in word 2003 makes the document look more professional, easy to find the item you need by clicking on the table of contents. so how to create a table of contents in word fastest? the answer is to create an automatic table of contents!
  • Controller component in AngularJSController component in AngularJS
    an angularjs application works primarily based on the controller component to control the flow of data in the application.
  • MVC structure in AngularJSMVC structure in AngularJS
    model view controller or mvc is a popular call, a software design model for web-based applications.
  • How to create a table, insert a table in Excel 2016How to create a table, insert a table in Excel 2016
    how to create a table, insert a table in excel 2016. your excel data needs to be inserted as a table to facilitate the management and editing of content accordingly. let's refer to the article detailing how to create and edit tables in excel 2016
  • MS Access 2003 - Lesson 15: Create an initial tableMS Access 2003 - Lesson 15: Create an initial table
    in this section, you are ready to create a table for the new database. in chapter 2, you used the table wizard to create tables easily. this not only shows that creating a table manually is difficult; but it is a sure way to understand the table.
  • How to create automatic table of contents in Word 2016How to create automatic table of contents in Word 2016
    you can create your own table of contents manually, but that takes a lot of time and effort. the following article details how to create a table of contents automatically in word 2016, with older versions of word you can do the same.
  • CREATE TABLE command in SQL to create a database tableCREATE TABLE command in SQL to create a database table
    what does the create table command in sql do? in this article, let's learn everything you need to know about the create table statement in sql!