i am beginners in Ember.js and i would like to get a response result and show in my view(html).
My Result = {"teste":{"code":"1","message":"hello"}}
My controller in Ember.js =
actions: {
discountCoupon: function(){
var lista = _this.store.find('teste', { "param": "123" });
console.info("return=" + lista.get('code'));
// result return===undefined
console.info("return===" + lista.get('message'));
// result return===undefined
},
My model:
import DS from 'ember-data';
export default DS.Model.extend({
code : DS.attr('string'),
message : DS.attr('string'), });
I Can't get the return of my backend.
Thank's in advance.
Aucun commentaire:
Enregistrer un commentaire