ng-repeat across list angularjs of only values -


i have list of countries

countrylist = ["india", "australia", "usa", "germany"] 

i ng-repeat across above list.....it not dictionary. tried using ng-repeat="item in countrylist track $index" gave me error. body can tell me why happening ?

please find console log error: [$parse:syntax] http://errors.angularjs.org/1.3.15/$parse/syntax?p0=%7b&p1=invalid%20key&p2=2&p3=%7b%7bipv4pub%7d%7d&p4=%7bipv4pub%7d%7d @ error (native) @ https://jiodns.jio.com/js/angular.min.js:6:417 @ ib.throwerror (https://jiodns.jio.com/js/angular.min.js:191:165) @ ib.object (https://jiodns.jio.com/js/angular.min.js:200:324) @ ib.primary (https://jiodns.jio.com/js/angular.min.js:190:207) @ ib.unary (https://jiodns.jio.com/js/angular.min.js:197:478) @ ib.multiplicative (https://jiodns.jio.com/js/angular.min.js:197:205) @ ib.additive (https://jiodns.jio.com/js/angular.min.js:197:63) @ ib.relational (https://jiodns.jio.com/js/angular.min.js:196:435) @ ib.equality (https://jiodns.jio.com/js/angular.min.js:196:291)

is countrylist available on scope ? if yes, there shouldn't problem. see fiddle: http://jsfiddle.net/hb7lu/14183/

  $scope.countrylist = ["india", "australia", "usa", "germany"]     <div ng-repeat="country in countrylist">       <p>{{country}}</p>   </div> 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -