@@ -12,28 +12,28 @@ import {
12
12
QueryList ,
13
13
OnChanges ,
14
14
} from 'angular2/core' ;
15
- import { CONST_EXPR , noop } from 'angular2/src/facade/lang' ;
16
15
import {
17
16
NG_VALUE_ACCESSOR ,
18
17
ControlValueAccessor
19
18
} from 'angular2/src/common/forms/directives/control_value_accessor' ;
20
19
import { BaseException } from 'angular2/src/facade/exceptions' ;
21
20
import { BooleanFieldValue } from '../../core/annotations/field-value' ;
22
- import { OneOf } from '../../core/annotations/one-of' ;
23
21
24
22
25
- const MD_INPUT_CONTROL_VALUE_ACCESSOR = CONST_EXPR ( new Provider (
23
+ const noop = ( ) => { } ;
24
+
25
+ const MD_INPUT_CONTROL_VALUE_ACCESSOR = new Provider (
26
26
NG_VALUE_ACCESSOR , {
27
27
useExisting : forwardRef ( ( ) => MdInput ) ,
28
28
multi : true
29
- } ) ) ;
29
+ } ) ;
30
30
31
31
// Invalid input type. Using one of these will throw an MdInputUnsupportedTypeException.
32
- const MD_INPUT_INVALID_INPUT_TYPE = CONST_EXPR ( [
32
+ const MD_INPUT_INVALID_INPUT_TYPE = [
33
33
'file' ,
34
34
'radio' ,
35
35
'checkbox' ,
36
- ] ) ;
36
+ ] ;
37
37
38
38
39
39
let nextUniqueId = 0 ;
@@ -81,7 +81,7 @@ export class MdPlaceholder {}
81
81
} )
82
82
export class MdHint {
83
83
// Whether to align the hint label at the start or end of the line.
84
- @Input ( ) @ OneOf ( [ 'start' , 'end' ] ) align : string ;
84
+ @Input ( ) align : 'start' | 'end' = 'start' ;
85
85
}
86
86
87
87
@@ -129,9 +129,9 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange
129
129
/**
130
130
* Bindings.
131
131
*/
132
- @Input ( ) @OneOf ( [ 'start' , 'end' ] ) align : string = 'start' ;
132
+ @Input ( ) align : 'start' | 'end' = 'start' ;
133
+ @Input ( ) dividerColor : 'primary' | 'accent' | 'warn' = 'primary' ;
133
134
@Input ( ) @BooleanFieldValue ( ) disabled : boolean = false ;
134
- @Input ( ) @OneOf ( [ 'primary' , 'accent' , 'warn' ] ) dividerColor : string = 'primary' ;
135
135
@Input ( ) @BooleanFieldValue ( ) floatingPlaceholder : boolean = true ;
136
136
@Input ( ) hintLabel : string = '' ;
137
137
@Input ( ) id : string = `md-input-${ nextUniqueId ++ } ` ;
@@ -234,8 +234,8 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange
234
234
}
235
235
}
236
236
237
- export const MD_INPUT_DIRECTIVES : any [ ] = CONST_EXPR ( [
237
+ export const MD_INPUT_DIRECTIVES : any [ ] = [
238
238
MdPlaceholder ,
239
239
MdInput ,
240
240
MdHint ,
241
- ] ) ;
241
+ ] ;
0 commit comments