forum

Home / DeveloperSection / Forums / ng-repeat attribute not working

ng-repeat attribute not working

Takeshi Okada234219-Mar-2015

Hi I’m new in angularjs I am try to print country list and state list. But my code is not working proper.

At the time one things is print. If you want to print country then you write print country code as first line and if you want to print state list then you write code print state list as first line according to my code.

My code is here

<h1>Sample Application</h1>
    <divng-app=""ng-init="countries=[{locale:'en-IN',name:'India'},{locale:'en-GB',name:'United Kingdom'},{locale:'en-FR',name:'France'}]">
        <h2>List of Countries with locale:</h2>
        <ul>
            <ling-repeat="country in countries">{{ 'Country: ' + country.name + ', Locale: ' + country.locale }}</li>
        </ul>
    </div>
 
    <divng-app=""ng-init="states=[{language:'Hindi',name:'Uttar Pradesh'},{language:'English',name:'Banglore'},{language:'Telgu',name:'Tamil Nadu'}]">
        <ul>
            <ling-repeat="state in states">{{'State: '+state.name+', Language: '+state.language}}</li>
        </ul>
    </div>
    <scriptsrc="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>

What is problem in my code I can’t understand please help me.

Thanks in advance.


Can you answer this question?


Answer

1 Answers

Liked By