Skip to content
Closed
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
6 changes: 3 additions & 3 deletions src/demo-app/expansion/expansion-demo.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1>Single Expansion Panel</h1>
<md-expansion-panel class="md-expansion-demo-width" #myPanel>
<md-expansion-panel-header>
<mat-panel-description>This is a panel description.</mat-panel-description>
<mat-panel-title>Panel Title</mat-panel-title>
<md-panel-description>This is a panel description.</md-panel-description>
<md-panel-title>Panel Title</md-panel-title>
</md-expansion-panel-header>
This is the content text that makes sense here.
<md-action-row>
Expand Down Expand Up @@ -49,4 +49,4 @@ <h1>Accordion</h1>
<button md-button (click)="panel3.expanded = false">CLOSE</button>
</md-action-row>
</md-expansion-panel>
</md-accordion>
</md-accordion>
4 changes: 1 addition & 3 deletions src/lib/expansion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export class CdkAccordion {
*/
@Directive({
selector: 'mat-accordion, md-accordion',
host: {
class: 'mat-accordion'
}
host: {'class': 'mat-accordion'}
})
export class MdAccordion extends CdkAccordion {}
51 changes: 39 additions & 12 deletions src/universal-app/kitchen-sink/kitchen-sink.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,34 @@ <h2>Datepicker</h2>
<md-datepicker #birthday></md-datepicker>
</md-input-container>

<h2>Expansion</h2>

<md-expansion-panel class="md-expansion-demo-width" #myPanel>
<md-expansion-panel-header>
<md-panel-description>This is a panel description.</md-panel-description>
<md-panel-title>Panel Title</md-panel-title>
</md-expansion-panel-header>
This is the content text that makes sense here.
<md-action-row>
<button md-button>Cancel</button>
<button md-button>Save</button>
</md-action-row>
</md-expansion-panel>

<md-accordion multi>
<md-expansion-panel>
<md-expansion-panel-header>Section 1</md-expansion-panel-header>
<p>This is the content text that makes sense here.</p>
</md-expansion-panel>
<md-expansion-panel>
<md-expansion-panel-header>Section 2</md-expansion-panel-header>
<p>This is the content text that makes sense here.</p>
</md-expansion-panel>
<md-expansion-panel>
<md-expansion-panel-header>Section 3</md-expansion-panel-header>
</md-expansion-panel>
</md-accordion>

<h2>Grid list</h2>

<md-grid-list cols="4">
Expand Down Expand Up @@ -184,18 +212,17 @@ <h2>Slider</h2>

<h2>Tabs</h2>

<!-- Tabs don't work because `_updateTabScrollPosition` tries to set the transform on start-up -->
<!--<md-tab-group>-->
<!--<md-tab label="Overview">-->
<!--The overview-->
<!--</md-tab>-->
<!--<md-tab>-->
<!--<ng-template md-tab-label>-->
<!--API docs-->
<!--</ng-template>-->
<!--The API docs-->
<!--</md-tab>-->
<!--</md-tab-group>-->
<md-tab-group>
<md-tab label="Overview">
The overview
</md-tab>
<md-tab>
<ng-template md-tab-label>
API docs
</ng-template>
The API docs
</md-tab>
</md-tab-group>

<nav md-tab-nav-bar>
<a md-tab-link href="https://google.com">Google</a>
Expand Down
2 changes: 2 additions & 0 deletions src/universal-app/kitchen-sink/kitchen-sink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
MdChipsModule,
MdDatepickerModule,
MdDialogModule,
MdExpansionModule,
MdGridListModule,
MdIconModule,
MdInputModule,
Expand Down Expand Up @@ -51,6 +52,7 @@ export class KitchenSink { }
MdChipsModule,
MdDatepickerModule,
MdDialogModule,
MdExpansionModule,
MdGridListModule,
MdIconModule,
MdInputModule,
Expand Down
7 changes: 5 additions & 2 deletions src/universal-app/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'zone.js';
import {enableProdMode} from '@angular/core';
import {renderModuleFactory} from '@angular/platform-server';
import {join} from 'path';
import {readFileSync} from 'fs-extra';
import {readFileSync, writeFileSync} from 'fs-extra';
import {KitchenSinkServerModuleNgFactory} from './kitchen-sink/kitchen-sink.ngfactory';

enableProdMode();
Expand All @@ -14,7 +14,10 @@ const result = renderModuleFactory(KitchenSinkServerModuleNgFactory, {
});

result
.then(html => console.log(html))
.then(html => {
console.log(html);
writeFileSync(join('dist', 'prerender.html'), html, 'utf-8');
})
// If rendering the module factory fails, exit the process with an error code because otherwise
// the CI task will not recognize the failure and will show as "success". The error message
// will be printed automatically by the `renderModuleFactory` method.
Expand Down