Skip to main content

Posts

Showing posts with the label data-ng-init angular

data-ng-init angular

The " data-ng-init " are used to initialize the application data and it's also called to ng-init  and  does not create a new scope and it's used to evaluate an expressions in the current scope. The example angular array code as given below. [{name:'Anil Singh',city:'Noida, India'}, {name:'Sunil ',city:'UP India'}, {name:'code-sample.com',city:'www'}] The example HTML code as given below. < div data-ng-init ="details=[{name:'Anil Singh',city:'Noida, India'},{name:'Sunil ',city:'UP'},{name:'code-sample.com',city:'www'}]">         < ul >             < li data-ng-repeat ="detail in details">                {{ detail.name }} : {{ detail.city }}             </ li >         </ ...