I'm new to angularJS, I'm trying to iterate through object properties mentioned in controller function using ng-repeat, but no success!
<body ng-app="myApp">
<div ng-controller="myCtrl">
<ul>
<li ng-repeat="dish in myCtrl.dishes">{{ dish.name + ', ' + dish.age + ', ' + dish.job }}</li>
</ul>
</div>
<script>
var app=angular.module('myApp',[]);
app.controller('myCtrl',function(){
var dishes=[
{
name:'nag',
age:'23',
job:'UI Developer'
},
{
name:'Manu',
age:'30',
job:'SE'
}
];
this.dishes = dishes;
});
</script>