I've been attempting to load a local file (todo.json
) located in the same directory as my webpage using the following line of code:
$http.get("todo.json").success( function( data ){ //Do Some logic});
However, when I try to do so, I encounter the following error message in the Javascript console:
Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///C:/Users/quickCoder/Desktop/HTML5Apps/todo.json'.
...
Just to clarify, the index.html
file with this code is in the same directory as todo.json
under the HTML5Apps
folder. Any suggestions on how to resolve this issue?