Skip to content

Commit

Permalink
Add ViewportRuler to providers
Browse files Browse the repository at this point in the history
  • Loading branch information
tinayuangao committed Dec 7, 2016
1 parent 53b4f6c commit 5c4b67d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/lib/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '@angular/core';
import {CommonModule} from '@angular/common';
import {MdRippleModule, coerceBooleanProperty, DefaultStyleCompatibilityModeModule} from '../core';
import {ViewportRuler} from '../core/overlay/position/viewport-ruler';


// TODO(jelbourn): Make the `isMouseDown` stuff done with one global listener.
Expand Down Expand Up @@ -166,7 +167,7 @@ export class MdButtonModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: MdButtonModule,
providers: []
providers: [ViewportRuler]
};
}
}
3 changes: 2 additions & 1 deletion src/lib/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {CommonModule} from '@angular/common';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';
import {coerceBooleanProperty} from '../core/coersion/boolean-property';
import {MdRippleModule, DefaultStyleCompatibilityModeModule} from '../core';
import {ViewportRuler} from '../core/overlay/position/viewport-ruler';


/**
Expand Down Expand Up @@ -391,7 +392,7 @@ export class MdCheckboxModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: MdCheckboxModule,
providers: []
providers: [ViewportRuler]
};
}
}
3 changes: 2 additions & 1 deletion src/lib/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
DefaultStyleCompatibilityModeModule,
} from '../core';
import {coerceBooleanProperty} from '../core/coersion/boolean-property';
import {ViewportRuler} from '../core/overlay/position/viewport-ruler';


/**
Expand Down Expand Up @@ -476,7 +477,7 @@ export class MdRadioModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: MdRadioModule,
providers: [MdUniqueSelectionDispatcher],
providers: [MdUniqueSelectionDispatcher, ViewportRuler],
};
}
}
3 changes: 2 additions & 1 deletion src/lib/tabs/tab-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import 'rxjs/add/operator/map';
import {MdRippleModule} from '../core/ripple/ripple';
import {MdTab} from './tab';
import {MdTabBody} from './tab-body';
import {ViewportRuler} from '../core/overlay/position/viewport-ruler';


/** Used to generate unique ID's for each tab component */
Expand Down Expand Up @@ -296,7 +297,7 @@ export class MdTabsModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: MdTabsModule,
providers: []
providers: [ViewportRuler]
};
}
}

0 comments on commit 5c4b67d

Please sign in to comment.