Lattice data is usually repetitive in nature. Ng-repeat directives, which can be used to easily draw tables. The following example demonstrates using the Ng-repeat directive to draw a table.
<table>
<tr>
<th>Name</th>
<th>Marks</th>
</tr>
<tr ng-repeat= "subject in Student.subjects" > <td>{{subject.name}}</td> <td>{{
Subject.marks}}</td>
</tr>
</table>
Tables can be styled using CSS styles, as follows:
<style>
table, Th, td {
BORDER:1PX solid grey;
Border-collapse:collapse;
padding:5px;
}
Table Tr:nth-child (odd) {
background-color: #f2f2f2;
}
Table Tr:nth-child (even) {
background-color: #ffffff;
}
</style>
Example
The following example shows all of the above instructions.
Testangularjs.html
Output
Open textangularjs.html in your Web browser and see the following results:
The above is ANGULARJS form the basic knowledge of the collation, follow-up continue to collate relevant knowledge, thank you for your support of this site!