From fb89d4f5ee13baf7e7a6c68e2a13e237dde30a08 Mon Sep 17 00:00:00 2001 From: Robert Messerle Date: Wed, 25 May 2016 09:24:44 -0700 Subject: [PATCH] fix(): adds directive constants to all components (#514) closes #513 --- src/components/icon/icon.ts | 2 ++ src/components/input/input.ts | 6 +----- src/components/list/list.ts | 2 +- src/components/progress-bar/progress-bar.ts | 2 ++ src/components/progress-circle/progress-circle.ts | 2 ++ src/components/sidenav/sidenav.ts | 3 +-- src/components/slide-toggle/slide-toggle.ts | 2 ++ src/components/toolbar/toolbar.ts | 2 ++ 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/icon/icon.ts b/src/components/icon/icon.ts index d4c2fe78031d..1a2e7ab8705e 100644 --- a/src/components/icon/icon.ts +++ b/src/components/icon/icon.ts @@ -222,3 +222,5 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked { } } } + +export const MD_ICON_DIRECTIVES = [MdIcon]; diff --git a/src/components/input/input.ts b/src/components/input/input.ts index e38faee702f6..71daa4cd424b 100644 --- a/src/components/input/input.ts +++ b/src/components/input/input.ts @@ -297,8 +297,4 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange } } -export const MD_INPUT_DIRECTIVES: any[] = [ - MdPlaceholder, - MdInput, - MdHint, -]; +export const MD_INPUT_DIRECTIVES = [MdPlaceholder, MdInput, MdHint]; diff --git a/src/components/list/list.ts b/src/components/list/list.ts index 51c557c41d36..38ac62c4cb64 100644 --- a/src/components/list/list.ts +++ b/src/components/list/list.ts @@ -90,4 +90,4 @@ export class MdListItem implements AfterContentInit { } } -export const MD_LIST_DIRECTIVES: any[] = [MdList, MdListItem, MdLine, MdListAvatar]; +export const MD_LIST_DIRECTIVES = [MdList, MdListItem, MdLine, MdListAvatar]; diff --git a/src/components/progress-bar/progress-bar.ts b/src/components/progress-bar/progress-bar.ts index 8aca3fcd3dd6..720619320106 100644 --- a/src/components/progress-bar/progress-bar.ts +++ b/src/components/progress-bar/progress-bar.ts @@ -88,3 +88,5 @@ export class MdProgressBar { function clamp(v: number, min = 0, max = 100) { return Math.max(min, Math.min(max, v)); } + +export const MD_PROGRESS_BAR_DIRECTIVES = [MdProgressBar]; diff --git a/src/components/progress-circle/progress-circle.ts b/src/components/progress-circle/progress-circle.ts index c3a8ac73e54f..2ff87de24a9f 100644 --- a/src/components/progress-circle/progress-circle.ts +++ b/src/components/progress-circle/progress-circle.ts @@ -292,3 +292,5 @@ function getSvgArc(currentValue: number, rotation: number) { return `M${start}A${pathRadius},${pathRadius} 0 ${largeArcFlag},${arcSweep} ${end}`; } + +export const MD_PROGRESS_CIRCLE_DIRECTIVES = [MdProgressCircle, MdSpinner]; diff --git a/src/components/sidenav/sidenav.ts b/src/components/sidenav/sidenav.ts index 9367131754fd..d4e61f233de0 100644 --- a/src/components/sidenav/sidenav.ts +++ b/src/components/sidenav/sidenav.ts @@ -8,7 +8,6 @@ import { Optional, Output, QueryList, - Type, ChangeDetectionStrategy, EventEmitter, Renderer @@ -375,4 +374,4 @@ export class MdSidenavLayout implements AfterContentInit { } -export const MD_SIDENAV_DIRECTIVES: Type[] = [MdSidenavLayout, MdSidenav]; +export const MD_SIDENAV_DIRECTIVES = [MdSidenavLayout, MdSidenav]; diff --git a/src/components/slide-toggle/slide-toggle.ts b/src/components/slide-toggle/slide-toggle.ts index 74b448f0b8b9..df1684231312 100644 --- a/src/components/slide-toggle/slide-toggle.ts +++ b/src/components/slide-toggle/slide-toggle.ts @@ -169,3 +169,5 @@ export class MdSlideToggle implements ControlValueAccessor { } } + +export const MD_SLIDE_TOGGLE_DIRECTIVES = [MdSlideToggle]; diff --git a/src/components/toolbar/toolbar.ts b/src/components/toolbar/toolbar.ts index 54cbc9c58016..a0353b30fb3e 100644 --- a/src/components/toolbar/toolbar.ts +++ b/src/components/toolbar/toolbar.ts @@ -41,3 +41,5 @@ export class MdToolbar { } } + +export const MD_TOOLBAR_DIRECTIVES = [MdToolbar];