my todo.json file:
[{"action":"Buy Flowers", "done":false},
{"action":"Get Shoes", "done":false},
{"action":"Collect Tickets", "done":true},
{"action":"Call Joe", "done":false}]
My Script:
var model = {user: "Adam"};
var todoApp = angular.module("todoApp",[]);
todoApp.run(function($http){
$http.get("todo.json").success(function(data){
model.items = data;
});
});
When I open developer console in Edge I am getting the following error:
SCRIPT438: Object doesn't support property or method 'success' todo.html (11,12)
My JSON, HTML/Script file are all in the same directory.