@@ -17,21 +17,10 @@ import {MdStepLabel} from './step-label';
17
17
host : {
18
18
'class' : 'mat-step-header' ,
19
19
'role' : 'tab' ,
20
- '[attr.id]' : 'labelId' ,
21
- '[attr.aria-controls]' : 'contentId' ,
22
- '[attr.aria-selected]' : 'selected'
23
20
} ,
24
21
encapsulation : ViewEncapsulation . None
25
22
} )
26
23
export class MdStepHeader {
27
- /** Unique label ID of step header. */
28
- @Input ( )
29
- labelId : string ;
30
-
31
- /** Unique content ID of step content. */
32
- @Input ( )
33
- contentId : string ;
34
-
35
24
/** Icon for the given step. */
36
25
@Input ( )
37
26
icon : string ;
@@ -42,15 +31,7 @@ export class MdStepHeader {
42
31
set label ( value : any ) {
43
32
this . _label = value ;
44
33
}
45
- private _label : string ;
46
-
47
- /** Templated label of the given step. */
48
- @Input ( )
49
- get stepLabel ( ) { return this . _stepLabel ; }
50
- set stepLabel ( value : any ) {
51
- this . _stepLabel = value ;
52
- }
53
- private _stepLabel : MdStepLabel ;
34
+ private _label : MdStepLabel | string ;
54
35
55
36
/** Index of the given step. */
56
37
@Input ( )
@@ -83,4 +64,14 @@ export class MdStepHeader {
83
64
this . _optional = coerceBooleanProperty ( value ) ;
84
65
}
85
66
private _optional : boolean ;
67
+
68
+ /** Returns string label of given step if it is a text label. */
69
+ get _stringLabel ( ) : string | null {
70
+ return this . label instanceof MdStepLabel ? null : this . label ;
71
+ }
72
+
73
+ /** Returns MdStepLabel if the label of given step is a template label. */
74
+ get _templateLabel ( ) : MdStepLabel | null {
75
+ return this . label instanceof MdStepLabel ? this . label : null ;
76
+ }
86
77
}
0 commit comments