Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixin for autosubscribe #9

Closed
joukevandermaas opened this issue Apr 8, 2016 · 2 comments
Closed

Mixin for autosubscribe #9

joukevandermaas opened this issue Apr 8, 2016 · 2 comments

Comments

@joukevandermaas
Copy link

Have you considered adding a mixin to add the autosubscribe behavior to controllers? It would be used like this:

import Ember from 'ember';
import QPAutoSubscribe from 'ember-query-params/mixins/query-params-controller';
const { Controller } = Ember;

export default Controller.extend(QPAutoSubscribe, {
  queryParams: [
    // ...
  ]
});

This would inject the service and call autoSubscribe(this) in init. By adding this into a mixin, we can e.g. auto-inject it in all controllers through an initializer.

@knownasilya
Copy link
Owner

Sounds like a great idea!

@knownasilya
Copy link
Owner

In v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants