I have a problem when set a value to the variable content of my controller.
Before using: this.set(‘content’,datos);
Currently make some modifications in the code and I make this call within: store.findQuery(‘elemento’,{bq:query}).then(function(elemento){…} where the variable “this” does not represent the same context.
What is the right way to do it?
App.ElementosController = Ember.ArrayController.extend({
buscarDato: function() {
// Código ...
store.findAll('tipo').then(function(tipo){
// Código ...
store.findQuery('elemento',{bq:query}).then(function(elemento){
// Código ...
//AQUI DESEO HACER LA ASIGNACIÓN
});
});
}
})
PD: Sorry for my English =)