@@ -42,37 +42,33 @@ export const _MdListItemMixinBase = mixinDisableRipple(MdListItemBase);
4242} )
4343export class MdListDivider { }
4444
45+
4546@Component ( {
4647 moduleId : module . id ,
47- selector : 'md-list, mat-list, md-nav-list, mat-nav-list' ,
48- host : { 'role' : 'list' } ,
48+ selector : 'md-nav-list, mat-nav-list' ,
49+ host : {
50+ 'role' : 'navigation' ,
51+ 'class' : 'mat-nav-list'
52+ } ,
4953 template : '<ng-content></ng-content>' ,
5054 styleUrls : [ 'list.css' ] ,
5155 inputs : [ 'disableRipple' ] ,
5256 encapsulation : ViewEncapsulation . None ,
5357 changeDetection : ChangeDetectionStrategy . OnPush ,
5458} )
55- export class MdList extends _MdListMixinBase implements CanDisableRipple { }
59+ export class MdNavList extends _MdListMixinBase implements CanDisableRipple { }
5660
57- /**
58- * Directive whose purpose is to add the mat- CSS styling to this selector.
59- * @docs -private
60- */
61- @Directive ( {
61+ @Component ( {
62+ moduleId : module . id ,
6263 selector : 'md-list, mat-list' ,
63- host : { 'class' : 'mat-list' }
64- } )
65- export class MdListCssMatStyler { }
66-
67- /**
68- * Directive whose purpose is to add the mat- CSS styling to this selector.
69- * @docs -private
70- */
71- @Directive ( {
72- selector : 'md-nav-list, mat-nav-list' ,
73- host : { 'class' : 'mat-nav-list' }
64+ template : '<ng-content></ng-content>' ,
65+ host : { 'class' : 'mat-list' } ,
66+ styleUrls : [ 'list.css' ] ,
67+ inputs : [ 'disableRipple' ] ,
68+ encapsulation : ViewEncapsulation . None ,
69+ changeDetection : ChangeDetectionStrategy . OnPush ,
7470} )
75- export class MdNavListCssMatStyler { }
71+ export class MdList extends _MdListMixinBase implements CanDisableRipple { }
7672
7773/**
7874 * Directive whose purpose is to add the mat- CSS styling to this selector.
@@ -146,9 +142,9 @@ export class MdListItem extends _MdListItemMixinBase implements AfterContentInit
146142 constructor ( private _renderer : Renderer2 ,
147143 private _element : ElementRef ,
148144 @Optional ( ) private _list : MdList ,
149- @Optional ( ) navList : MdNavListCssMatStyler ) {
145+ @Optional ( ) private _navList : MdNavList ) {
150146 super ( ) ;
151- this . _isNavList = ! ! navList ;
147+ this . _isNavList = ! ! _navList ;
152148 }
153149
154150 ngAfterContentInit ( ) {
@@ -157,7 +153,7 @@ export class MdListItem extends _MdListItemMixinBase implements AfterContentInit
157153
158154 /** Whether this list item should show a ripple effect when clicked. */
159155 isRippleEnabled ( ) {
160- return ! this . disableRipple && this . _isNavList && ! this . _list . disableRipple ;
156+ return ! this . disableRipple && this . _isNavList && ! this . _navList . disableRipple ;
161157 }
162158
163159 _handleFocus ( ) {
0 commit comments