ANGULARJS Collection Data Traversal display

Source: Internet
Author: User



ANGULARJS Collection Data Traversal display


1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "UTF-8">5 <title>ANGULARJS Collection Data Traversal display</title>6 <Scripttype= "Text/javascript"src=".. /js/angular.min.js "></Script>7 </Head>8 <BodyNg-app= "MyApp"Ng-controller= "Myctrl">9 <Tablewidth= "100%"Border= "1">Ten <TR> One <TD>Serial number</TD> A <TD>Product number</TD> - <TD>Product Name</TD> - <TD>Price</TD> the </TR> - <TRng-repeat= "Product in Products"> - <TD>{{$index +1}}</TD> - <TD>{{Product.id}}</TD> + <TD>{{Product.name}}</TD> - <TD>{{Product.price}}</TD> + </TR> A </Table> at </Body> - <Scripttype= "Text/javascript"> - varMyApp=Angular.module ("MyApp",[]); - Myapp.controller ("Myctrl",["$scope",function($scope) { - $scope. Products= [ -  { in ID:1001, - Name:'Digital Camera', to Price : the +  }, -  { the ID:1002, * Name:' Mobile', $ Price :4000Panax Notoginseng  } -  ]; the  }]) + </Script> A </HTML>


ANGULARJS Collection Data Traversal display


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.