I have a json file with my folder. as a sample it is like this:
json file :
{
"name" : "testing"
}
in my view file i am trying like this:
jQuery(document).ready(function($) {
var model = Backbone.Model.extend({});
var view = Backbone.View.extend({
model : model,
initialize : function () {
this.data = $.getJSON("OriginatingBanks.json",
function(data) {
console.log(data); //data not at all loading.
}).error(function(jqXhr, textStatus, error) {
console.log("ERROR: " + textStatus + ", " + error);
});
}
});
var originatingBank = new view;
});
the json file sitting with html file as a sibling. what wrong goes here? any one help me?
update
While i try to open using the localhost, I am getting this error from local server: