5
5
* Use of this source code is governed by an MIT-style license that can be
6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
- import { NgModule , ModuleWithProviders } from '@angular/core' ;
8
+ import { NgModule } from '@angular/core' ;
9
9
10
10
import { MatchMedia } from './match-media' ;
11
11
import { MediaMonitor } from './media-monitor' ;
12
12
import { ObservableMediaProvider } from './observable-media-service' ;
13
13
import { BreakPointsProvider } from './breakpoints/break-points' ;
14
14
import { BreakPointRegistry } from './breakpoints/break-point-registry' ;
15
15
16
-
17
-
18
16
/**
19
17
* *****************************************************************
20
18
* Define module for the MediaQuery API
@@ -24,18 +22,13 @@ import {BreakPointRegistry} from './breakpoints/break-point-registry';
24
22
@NgModule ( {
25
23
providers : [
26
24
MatchMedia , // Low-level service to publish observables w/ window.matchMedia()
27
- MediaMonitor , // MediaQuery monitor service observes all known breakpoints
28
- BreakPointRegistry , // Registry of known/used BreakPoint(s)
29
25
BreakPointsProvider , // Supports developer overrides of list of known breakpoints
26
+ BreakPointRegistry , // Registry of known/used BreakPoint(s)
27
+ MediaMonitor , // MediaQuery monitor service observes all known breakpoints
30
28
ObservableMediaProvider // easy subscription injectable `media$` matchMedia observable
31
29
]
32
30
} )
33
31
export class MediaQueriesModule {
34
- static forRoot ( ) : ModuleWithProviders {
35
- return {
36
- ngModule : MediaQueriesModule
37
- } ;
38
- }
39
32
}
40
33
41
34
0 commit comments