I am new in AngularJS. I have a situation where I need to call and read a json file. Here is my Code
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<ul>
<li ng-repeat="todo in todos">
{{todo.text}} - <em>{{todo.done}}</em>
</li>
</ul>
</div>
<script>
var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope, $http) {
$http.get('todos.json').success (function(data){
$scope.todos = data;
});
});
</script>
</body>
</html>
This code runs fine in firefox but not in Chrome. please help me..