File
Metadata
| changeDetection |
ChangeDetectionStrategy.OnPush |
| selector |
home-page |
| templateUrl |
./home-page.component.html |
|
Public
readme
|
Default value : require('html-loader!markdown-loader!./../../../../../../README.md').replace(
'<h1 id="rucken-todo">rucken-todo</h1>',
''
)
|
|
|
|
title$
|
Type : Observable<string>
|
|
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { BindIoInner } from 'ngx-bind-io';
declare var require: any;
@BindIoInner()
@Component({
selector: 'home-page',
templateUrl: './home-page.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class HomePageComponent {
public readme = require('html-loader!markdown-loader!./../../../../../../README.md').replace(
'<h1 id="rucken-todo">rucken-todo</h1>',
''
);
title$: Observable<string>;
constructor(private _activatedRoute: ActivatedRoute) {
this.title$ = this._activatedRoute.data.pipe(map(data => data && data.meta && data.meta.title));
}
}
<div class="container-fluid">
<h3 class="page-header">
<span>{{ title$ | async | translate}}</span>
</h3>
<div [innerHTML]="readme|safeHtml"></div>
</div>
Legend
Html element with directive