-
Notifications
You must be signed in to change notification settings - Fork 773
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
feat(ObservableMedia): use ObservableMedia class as provider token #158
Conversation
69c3424
to
e355891
Compare
Context Previous usage example doesn't have a type on the constructor prop, which throws Reference CLI Issue: angular/angular-cli#4427 |
@d3viant0ne - Thx to Josh for this great catch and alert. |
Semantically, Why does I'm not specifically asking to return an incompatible object, just that if I inject I see that export const ObservableMediaService: OpaqueToken = new OpaqueToken('flex-layout-media-service'); This means, my previous comment is not fully valid. Is this a standard practice in Angular that tokens that refer to service be named with |
@thekalinga - when you use
|
e355891
to
27dc5e6
Compare
27dc5e6
to
46166f1
Compare
@d3viant0ne - can you review plz. |
* Refactor BreakPoint-related classes. * Refactor implementations of Providers * Improve DI and replace `ObservableMediaService` opaque token with **`ObservableMedia`** class BREAKING CHANGE: Deprecated use of `ObservableMediaService` opaque token. Developers now simply use the ObservableMedia class to inject the service. *before* ```js constructor( @Inject(ObserverableMediaService) private media:any ) { ... } ``` **after** ```js constructor(private media:ObservableMedia) { ... } ```
46166f1
to
4b1ee6d
Compare
Certainly, give me 20 minutes |
Like the DI change, Media Query api / code is nice and tidy now. Tried you branch on my current work project, after the minor update to the constructor & it's sub, everything worked like a charm. Ship It :) |
…ngular#158) * Refactor BreakPoint-related classes. * Refactor implementations of Providers * Improve DI and replace `ObservableMediaService` opaque token with **`ObservableMedia`** class BREAKING CHANGE: Deprecated use of `ObservableMediaService` opaque token. Developers now simply use the ObservableMedia class to inject the service. *before* ```js constructor( @Inject(ObserverableMediaService) private media:any ) { ... } ``` **after** ```js constructor(private media:ObservableMedia) { ... } ```
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
ObservableMediaService
opaque token withObservableMedia
classBREAKING CHANGE:
Remove
ObservableMediaService
opaque token; as it adds complexity overhead. Developers should now simply use the ObservableMedia class to inject the service instance.-before -
-after -