ember.js - ember store.find promise not being fulfilled in time -


i'm using arraycontroller itemcontroller i'm having problems getting store.find promise fulfilled before hotelname , hoteladdress properties in itemcontroller used. idea on how can unsure store find fulfilled before returning? know store.find works. i'm able see results timing off. thank you.

export default ember.arraycontroller.extend({     itemcontroller: ..., });  export default ember.objectcontroller.extend({     init: function() {         this._super();     },     hotelname: function() {         var self = this;         self.store.find('hotel', this.get('hotelid')).then(function(hotel) {             self.set('hotelname', hotel.get('name'));         });     }.property('hotelid'),      hoteladdress: function() {         var self = this;         self.store.find('hotel', this.get('hotelid')).then(function(hotel) {             self.set('hoteladdress', hotel.get('street'));         });     }.property('hotelid') }); 


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -