'POST'라는 모델에 함수를 만들고 POST 요청을 통해 서버에 요청을 보내려합니다 (아래 샘플). 요청을 보내려면 rootUrl에 영향을주지 않고 url을 어떻게 설정할 수 있습니까? 티아!Backbone.JS : 모델의 기능에 대한 사용자 정의 URL
MyModel = Backbone.Model.extend({
urlRoot: '../mymodel'
initialize: function(){
},
post: function(){
// how put the url here?
// this is the custom url: '../post/mymodel/' + this.model.get('id')
// this is the expected log on server:
// POST: ../post/mymodel/323133
});
감사합니다! 하지만 POST를 통해 어떻게 요청할 수 있습니까? – jrsalunga