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