[英]backbone request json from backend service (cross domain)
I'm trying to request the json from the backend service using backbone, I want to request the data and then parse it into the required client side structure, so I want to know why the following simple example does not make a call out to the backend service: 我正在尝试使用骨干网从后端服务请求json,我想请求数据,然后将其解析为所需的客户端结构,因此我想知道为什么下面的简单示例没有对后端服务:
Book = Backbone.Model.extend({});
Books = Backbone.Collection.extend({
model: Book,
url: 'http://foobar.cloudapp.net/contents',
parse: function (response) {
return response;
}
});
function default_start_up() {
var books = new Books();
books.fetch();
};
我已经将此jQuery插件与成功的跨域ajax一起使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.