File
Implements
Metadata
selector |
app-dashboard |
styleUrls |
main-layout.component.scss |
templateUrl |
./main-layout.component.html |
Methods
ngOnDestroy
|
ngOnDestroy()
|
|
|
showBreadcrumb
|
showBreadcrumb:
|
Default value : true
|
|
version
|
version: string
|
Type : string
|
Default value : "0.0.0"
|
|
import {Component, OnDestroy, OnInit} from "@angular/core";
import {MainLayoutService} from "./main-layout.service";
@Component({
selector: 'app-dashboard', //according to template
templateUrl: './main-layout.component.html',
styleUrls: ['./main-layout.component.scss']
})
export class MainLayoutComponent implements OnInit, OnDestroy {
showBreadcrumb = true;
constructor(private mainLayoutService: MainLayoutService) {
}
version: string = "0.0.0";
ngOnInit() {
this.mainLayoutService.getVersion().subscribe(
data => this.version = data.version,
error => console.error("Can't load version", error)
);
}
ngOnDestroy() {
}
}
<ng-template ngbModalContainer></ng-template>
<crm-spinner></crm-spinner>
<crm-header></crm-header>
<div class="app-body">
<!--CRM sidebar-->
<crm-sidebar></crm-sidebar>
<!-- Main content -->
<main class="main">
<!-- Breadcrumb -->
<ol class="breadcrumb" [hidden]="!showBreadcrumb">
<breadcrumbs></breadcrumbs>
<!-- Breadcrumb Menu (add when need)-->
<li class="breadcrumb-menu">
<div aria-label="Button group with nested dropdown" class="btn-group" role="group">
<!--<a class="btn btn-secondary" href="/docs" target="_blank"><i class="icon-docs"></i> Docs</a>-->
</div>
</li>
</ol>
<div class="container-fluid">
<router-outlet></router-outlet>
</div>
</main>
<crm-aside></crm-aside>
</div>
<footer class="app-footer">
CRM © 2017 DataEngi
<span class="float-right">{{version}}</span>
</footer>
<crm-confirm-dialog></crm-confirm-dialog>
Legend
Html element with directive