mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-11 21:15:07 +00:00
8910e6f5dc
+ Http changed with HttpClient, + Angular Material Element examples added, + angular2-markdown Library added
33 lines
825 B
TypeScript
33 lines
825 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { ActivatedRoute } from '@angular/router';
|
|
import { COMPONENT_MAP } from './example-components';
|
|
|
|
@Component({
|
|
selector : 'fuse-angular-material',
|
|
templateUrl: './angular-material.component.html',
|
|
styleUrls : ['./angular-material.component.scss']
|
|
})
|
|
export class FuseAngularMaterialComponent implements OnInit
|
|
{
|
|
id: string;
|
|
title: string;
|
|
examples: any;
|
|
|
|
constructor(
|
|
private route: ActivatedRoute
|
|
)
|
|
{
|
|
}
|
|
|
|
ngOnInit()
|
|
{
|
|
this.route.params.subscribe(params => {
|
|
this.id = params['id'];
|
|
const _title = this.id.replace('-', ' ');
|
|
this.title = _title.charAt(0).toUpperCase() + _title.substring(1);
|
|
this.examples = COMPONENT_MAP[this.id];
|
|
});
|
|
}
|
|
}
|
|
|