@@ -6,45 +6,46 @@ import {
66 ChangeDetectionStrategy ,
77 Directive
88} from '@angular/core' ;
9+ import { DefaultStyleCompatibilityModeModule } from '../core' ;
910
1011
1112/**
1213 * Content of a card, needed as it's used as a selector in the API.
1314 */
1415@Directive ( {
15- selector : 'md-card-content'
16+ selector : 'md-card-content, mat-card-content '
1617} )
1718export class MdCardContent { }
1819
1920/**
2021 * Title of a card, needed as it's used as a selector in the API.
2122 */
2223@Directive ( {
23- selector : 'md-card-title'
24+ selector : 'md-card-title, mat-card-title '
2425} )
2526export class MdCardTitle { }
2627
2728/**
2829 * Sub-title of a card, needed as it's used as a selector in the API.
2930 */
3031@Directive ( {
31- selector : 'md-card-subtitle'
32+ selector : 'md-card-subtitle, mat-card-subtitle '
3233} )
3334export class MdCardSubtitle { }
3435
3536/**
3637 * Action section of a card, needed as it's used as a selector in the API.
3738 */
3839@Directive ( {
39- selector : 'md-card-actions'
40+ selector : 'md-card-actions, mat-card-actions '
4041} )
4142export class MdCardActions { }
4243
4344/**
4445 * Footer of a card, needed as it's used as a selector in the API.
4546 */
4647@Directive ( {
47- selector : 'md-card-footer'
48+ selector : 'md-card-footer, mat-card-footer '
4849} )
4950export class MdCardFooter { }
5051
@@ -70,7 +71,7 @@ it also provides a number of preset styles for common card sections, including:
7071
7172@Component ( {
7273 moduleId : module . id ,
73- selector : 'md-card' ,
74+ selector : 'md-card, mat-card ' ,
7475 templateUrl : 'card.html' ,
7576 styleUrls : [ 'card.css' ] ,
7677 encapsulation : ViewEncapsulation . None ,
@@ -95,7 +96,7 @@ TODO(kara): update link to demo site when it exists
9596
9697@Component ( {
9798 moduleId : module . id ,
98- selector : 'md-card-header' ,
99+ selector : 'md-card-header, mat-card-header ' ,
99100 templateUrl : 'card-header.html' ,
100101 encapsulation : ViewEncapsulation . None ,
101102 changeDetection : ChangeDetectionStrategy . OnPush ,
@@ -115,7 +116,7 @@ TODO(kara): update link to demo site when it exists
115116
116117@Component ( {
117118 moduleId : module . id ,
118- selector : 'md-card-title-group' ,
119+ selector : 'md-card-title-group, mat-card-title-group ' ,
119120 templateUrl : 'card-title-group.html' ,
120121 encapsulation : ViewEncapsulation . None ,
121122 changeDetection : ChangeDetectionStrategy . OnPush ,
@@ -124,9 +125,17 @@ export class MdCardTitleGroup {}
124125
125126
126127@NgModule ( {
128+ imports : [ DefaultStyleCompatibilityModeModule ] ,
127129 exports : [
128- MdCard , MdCardHeader , MdCardTitleGroup , MdCardContent , MdCardTitle , MdCardSubtitle ,
129- MdCardActions , MdCardFooter
130+ MdCard ,
131+ MdCardHeader ,
132+ MdCardTitleGroup ,
133+ MdCardContent ,
134+ MdCardTitle ,
135+ MdCardSubtitle ,
136+ MdCardActions ,
137+ MdCardFooter ,
138+ DefaultStyleCompatibilityModeModule ,
130139 ] ,
131140 declarations : [
132141 MdCard , MdCardHeader , MdCardTitleGroup , MdCardContent , MdCardTitle , MdCardSubtitle ,
0 commit comments