@@ -17,40 +17,21 @@ import {MdStepLabel} from './step-label';
1717 host : {
1818 'class' : 'mat-step-header' ,
1919 'role' : 'tab' ,
20- '[attr.id]' : 'labelId' ,
21- '[attr.aria-controls]' : 'contentId' ,
22- '[attr.aria-selected]' : 'selected'
2320 } ,
2421 encapsulation : ViewEncapsulation . None
2522} )
2623export 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-
3524 /** Icon for the given step. */
3625 @Input ( )
3726 icon : string ;
3827
39- /** Text label of the given step. */
28+ /** Label of the given step. */
4029 @Input ( )
4130 get label ( ) { return this . _label ; }
4231 set label ( value : any ) {
4332 this . _label = value ;
4433 }
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 ;
5435
5536 /** Index of the given step. */
5637 @Input ( )
@@ -83,4 +64,14 @@ export class MdStepHeader {
8364 this . _optional = coerceBooleanProperty ( value ) ;
8465 }
8566 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+ }
8677}
0 commit comments