Updated Angular Material examples

This commit is contained in:
Sercan Yemen
2018-06-20 16:16:02 +03:00
parent faef6ec6f8
commit 13746c2a73
138 changed files with 2124 additions and 592 deletions

View File

@@ -0,0 +1 @@
/** No CSS for this example */

View File

@@ -0,0 +1,17 @@
<mat-tab-group>
<mat-tab label="First">
<ng-template matTabContent>
Content 1 - Loaded: {{getTimeLoaded(1) | date:'medium'}}
</ng-template>
</mat-tab>
<mat-tab label="Second">
<ng-template matTabContent>
Content 2 - Loaded: {{getTimeLoaded(2) | date:'medium'}}
</ng-template>
</mat-tab>
<mat-tab label="Third">
<ng-template matTabContent>
Content 3 - Loaded: {{getTimeLoaded(3) | date:'medium'}}
</ng-template>
</mat-tab>
</mat-tab-group>

View File

@@ -0,0 +1,21 @@
import {Component} from '@angular/core';
/**
* @title Tab group where the tab content is loaded lazily (when activated)
*/
@Component({
selector: 'tab-group-lazy-loaded-example',
templateUrl: 'tab-group-lazy-loaded-example.html',
styleUrls: ['tab-group-lazy-loaded-example.css'],
})
export class TabGroupLazyLoadedExample {
tabLoadTimes: Date[] = [];
getTimeLoaded(index: number) {
if (!this.tabLoadTimes[index]) {
this.tabLoadTimes[index] = new Date();
}
return this.tabLoadTimes[index];
}
}