Skip to content

Using key as reference to a service #74

@bedrosenator

Description

@bedrosenator

I'm not sure if it was supported properly, but it worked well before upgrade to 0.3.8

We used a service to store query params in application controller to be accessible within our application.
So it was was working code

export const appQueryParams = new QueryParams({
  'someService.property': {
      as: 'property',
      defaultValue: 3600,
      replace: true,
      deserialize(value) {
        return parseInt(value);
      }
    }, 
});

export default Controller.extend(appQueryParams.Mixin, {
  someService: Ember.inject.service(),
})

But now it works only in case of alias is being set in controller like this

export const appQueryParams = new QueryParams({
  someServicePropertyAlias: {
      as: 'property',
      defaultValue: 3600,
      replace: true,
      deserialize(value) {
        return parseInt(value);
      }
    }, 
});

export default Controller.extend(appQueryParams.Mixin, {
  someService: Ember.inject.service(),
  someServicePropertyAlias: alias('someService.propertyAlias'),
})

Is this functionality supported? Or maybe there are issues in our code?
Thanks for help

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