Skip to content

Service wont start unless I console log clock #7

@jrock2004

Description

@jrock2004

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions