Detailed description of AngularJS table use _ AngularJS

Source: Internet
Author: User
This article mainly introduces the use of tables in AngularJS. As a popular JavaScript framework, AngularJS provides a powerful table function. If you need it, you can refer to the following table data, which is usually repeated in nature. The ng-repeat command can be used to easily draw tables. The following example shows how to use the ng-repeat command to draw a table.

 
 
Name Marks
{{ subject.name }} {{ subject.marks }}

You can use the CSS style to set the style of a table as follows:

 

Example

The following example shows all the preceding commands.
TestAngularJS.html

Angular JS TableAngularJS Sample Application

Enter first name:
Enter last name:
Name: {Student. fullName ()}}
Subject:
Name Marks
{Subject. name }} {Subject. marks }}

Script function studentController ($ scope) {$ scope. student = {firstName: "Mahesh", lastName: "Parashar", fees: 500, subjects: [{name: 'physics ', marks: 70}, {name: 'chemistry ', marks: 80}, {name: 'Math', marks: 65}, {name: 'inc', marks: 75}, {name: 'hindi ', marks: 67}], fullName: function () {var studentObject; studentObject = $ scope. student; return studentObject. firstName + "" + studentObject. lastName ;};} script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.