So I am trying to inject the clock service in my model. But it will not start unless I interact with the clock service.
clock: Ember.inject.service('booking-counter'),
isAvailable: Ember.computed('deadline', 'isbookable', 'clock.time', 'clock', function() {
console.log(this.get('clock'));
if(!this.get('isbookable')) {
return false;
}
return moment(this.get('deadline')) > moment();
})
If I take out the console log the service will not start. Any ideas on what I am doing wrong?
So I am trying to inject the clock service in my model. But it will not start unless I interact with the clock service.
If I take out the console log the service will not start. Any ideas on what I am doing wrong?