Index.js
App = Ember.Application.create();
App.Router.map(function() {
// put your routes here
this.route('honey', {path:'honey'});
});
App.HoneyAdapter=DS.RESTAdapter.extend({
host :"http://localhost:8078/advanceSpring/service/getReverse/",
suffix: ".action?name="+this.get('name'),
/*host: "http://localhost:8078",
namespace: "/advanceSpring/service/getReverse",
buildURL: function(config) {
var url = this.host + this.namespace + '.action?';
url = url + 'name='+ this.get("name");
return url;
}, */
pathForType: function(type) {
return this._super(type) + this.get('suffix');
}
});
App.Honey =DS.Model.extend({
name: DS.attr('string'),
});
App.HoneyController= Ember.Controller.extend({
actions:{
handleSubmit: function(){
alert('First Name is ' + this.get('name'));
}
}
});
App.HoneyRoute = Ember.Route.extend({
model: function() {
alert(this.get('name'));
return this.store.find('honey');
}
});
Any body have sample code for interaction of spring and ember js interaction . I have tried a lot but still error is coming I am not able to understand where i'm getting wrong . If anyone aware about then Please help me out . And i'm working on starterkit.
Aucun commentaire:
Enregistrer un commentaire