Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(RC6): add directives for custom elements that are part of the APIs. #1121

Merged
merged 1 commit into from
Aug 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions src/lib/card/card.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
import {NgModule, Component, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';
import {
NgModule,
Component,
ViewEncapsulation,
ChangeDetectionStrategy,
Directive
} from '@angular/core';


/**
* Content of a card, needed as it's used as a selector in the API.
*/
@Directive({
selector: 'md-card-content'
})
export class MdCardContent {}

/**
* Title of a card, needed as it's used as a selector in the API.
*/
@Directive({
selector: 'md-card-title'
})
export class MdCardTitle {}

/**
* Sub-title of a card, needed as it's used as a selector in the API.
*/
@Directive({
selector: 'md-card-subtitle'
})
export class MdCardSubtitle {}

/**
* Action section of a card, needed as it's used as a selector in the API.
*/
@Directive({
selector: 'md-card-actions'
})
export class MdCardActions {}


/*
Expand Down Expand Up @@ -75,7 +114,10 @@ TODO(kara): update link to demo site when it exists
export class MdCardTitleGroup {}

/** @deprecated */
export const MD_CARD_DIRECTIVES: any[] = [MdCard, MdCardHeader, MdCardTitleGroup];
export const MD_CARD_DIRECTIVES: any[] = [
MdCard, MdCardContent, MdCardHeader, MdCardTitleGroup, MdCardTitle, MdCardSubtitle,
MdCardActions
];


@NgModule({
Expand Down
7 changes: 6 additions & 1 deletion src/lib/list/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import {
} from '@angular/core';
import {MdLine, MdLineSetter, MdLineModule} from '@angular2-material/core/line/line';

@Directive({
selector: 'md-divider'
})
export class MdListDivider {}

@Component({
moduleId: module.id,
selector: 'md-list, md-nav-list',
Expand Down Expand Up @@ -66,7 +71,7 @@ export class MdListItem implements AfterContentInit {
}

/** @deprecated */
export const MD_LIST_DIRECTIVES = [MdList, MdListItem, MdListAvatar];
export const MD_LIST_DIRECTIVES = [MdList, MdListDivider, MdListItem, MdListAvatar];


@NgModule({
Expand Down
10 changes: 8 additions & 2 deletions src/lib/toolbar/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ import {
Component,
ChangeDetectionStrategy,
Input,
ViewEncapsulation
ViewEncapsulation,
Directive
} from '@angular/core';
import {Renderer} from '@angular/core';
import {ElementRef} from '@angular/core';

@Directive({
selector: 'md-toolbar-row'
})
export class MdToolbarRow {}

@Component({
moduleId: module.id,
selector: 'md-toolbar',
Expand Down Expand Up @@ -46,7 +52,7 @@ export class MdToolbar {
}

/** @deprecated */
export const MD_TOOLBAR_DIRECTIVES = [MdToolbar];
export const MD_TOOLBAR_DIRECTIVES = [MdToolbar, MdToolbarRow];


@NgModule({
Expand Down