{"id":234,"date":"2017-03-23T11:00:54","date_gmt":"2017-03-23T11:00:54","guid":{"rendered":"http:\/\/codeinsightacademy.com\/blog\/?p=234"},"modified":"2017-05-12T05:18:50","modified_gmt":"2017-05-12T05:18:50","slug":"ng-repeat","status":"publish","type":"post","link":"https:\/\/codeinsightacademy.com\/blog\/angular-js\/ng-repeat\/","title":{"rendered":"ng-repeat"},"content":{"rendered":"<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">&lt;DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta CHARSET=\"UTF-8\"&gt;\r\n        &lt;script src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.4.8\/angular.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body ng-app=\"myApp\" ng-controller=\"myCtrl\"&gt;\r\n        &lt;h2&gt;ng-repeat&lt;\/h2&gt;\r\n        &lt;fieldset&gt;\r\n            &lt;legend&gt;\r\n                List\r\n            &lt;\/legend&gt;\r\n            &lt;div ng-init='name = [\"Shailesh\", \"Mahesh\", \"Shilpa\"]'&gt;\r\n                &lt;ul&gt;\r\n                    &lt;li ng-repeat=\"x in name\"&gt;{{x}}&lt;\/li&gt;\r\n                &lt;\/ul&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/fieldset&gt;\r\n        &lt;fieldset&gt;\r\n            &lt;legend&gt;\r\n                Table\r\n            &lt;\/legend&gt;\r\n            &lt;div ng-init='months = [\"Jan\", \"Feb\", \"Mar\"]'&gt;\r\n                &lt;table border=\"1\"&gt;\r\n                    &lt;tr ng-repeat=\"x in months\"&gt;\r\n                        &lt;td&gt;{{x}}&lt;\/td&gt;\r\n                    &lt;\/tr&gt;\r\n                &lt;\/table&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/fieldset&gt;\r\n        &lt;fieldset&gt;\r\n            &lt;legend&gt;\r\n                Select\r\n            &lt;\/legend&gt;\r\n            &lt;div ng-init='cities = [{\"id\":\"1\", \"value\":\"Mumbai\"}, {\"id\":\"2\", \"value\":\"Pune\"}, {\"id\":\"3\", \"value\":\"Nagpur\"}]'&gt;\r\n                &lt;select&gt;\r\n                    &lt;option ng-repeat=\"x in cities\" value=\"{{x.id}}\"&gt;{{x.value}}&lt;\/option&gt;\r\n                &lt;\/select&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/fieldset&gt;\r\n    &lt;\/body&gt;\r\n    &lt;script&gt;\r\n                var app = angular.module(\"myApp\", []);\r\n                app.controller(\"myCtrl\", function($scope) {\r\n\r\n                });\r\n    &lt;\/script&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &lt;DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta CHARSET=&#8221;UTF-8&#8243;&gt; &lt;script src=&#8221;http:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.4.8\/angular.min.js&#8221;&gt;&lt;\/script&gt; &lt;\/head&gt; &lt;body ng-app=&#8221;myApp&#8221; ng-controller=&#8221;myCtrl&#8221;&gt; &lt;h2&gt;ng-repeat&lt;\/h2&gt; &lt;fieldset&gt; &lt;legend&gt; List &lt;\/legend&gt; &lt;div ng-init=&#8217;name = [&#8220;Shailesh&#8221;, &#8220;Mahesh&#8221;, &#8220;Shilpa&#8221;]&#8217;&gt; &lt;ul&gt; &lt;li ng-repeat=&#8221;x in name&#8221;&gt;{{x}}&lt;\/li&gt; &lt;\/ul&gt; &lt;\/div&gt; &lt;\/fieldset&gt; &lt;fieldset&gt; &lt;legend&gt; Table &lt;\/legend&gt; &lt;div ng-init=&#8217;months = [&#8220;Jan&#8221;, &#8220;Feb&#8221;, &#8220;Mar&#8221;]&#8217;&gt; &lt;table border=&#8221;1&#8243;&gt; &lt;tr ng-repeat=&#8221;x in months&#8221;&gt; &lt;td&gt;{{x}}&lt;\/td&gt; &lt;\/tr&gt; &lt;\/table&gt; &lt;\/div&gt; &lt;\/fieldset&gt; &lt;fieldset&gt; &lt;legend&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/234"}],"collection":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":3,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/234\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/234\/revisions\/254"}],"wp:attachment":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/media?parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/categories?post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/tags?post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}