I just started using AngularJS 1.3. I am trying to get access to scope related property that I assigned inside a function. But it seems that there is something wrong. Can someone help me out please?
<!DOCTYPE html>
<html data-ng-app="">
<head>
<title>SimpleController</title>
</head>
<body>
<div data-ng-controller="SimpleController">
<ul>
<li data-ng-repeat="emp in employees">
{{emp.name}}
</li>
</ul>
</div>
<script src="angular.min.js"></script>
<script>
function SimpleController($scope) {
$scope.employees = [
{name : 'emp1', id : 'id1'},
{name : 'emp2', id : 'id2'},
{name : 'emp3', id : 'id3'}
];
}
</script>
</body>
</html>