2017-07-27 15:05:50 +00:00
|
|
|
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
2017-08-02 08:53:30 +00:00
|
|
|
import { FuseLayoutService } from '../core/services/layout.service';
|
2017-07-27 15:05:50 +00:00
|
|
|
import { Subscription } from 'rxjs/Subscription';
|
2017-07-12 12:35:07 +00:00
|
|
|
|
|
|
|
@Component({
|
2017-08-02 08:53:30 +00:00
|
|
|
selector : 'fuse-main',
|
|
|
|
templateUrl : './main.component.html',
|
|
|
|
styleUrls : ['./main.component.scss'],
|
2017-07-15 15:03:40 +00:00
|
|
|
encapsulation: ViewEncapsulation.None
|
2017-07-12 12:35:07 +00:00
|
|
|
})
|
2017-08-02 08:53:30 +00:00
|
|
|
export class FuseMainComponent implements OnInit, OnDestroy
|
2017-07-12 12:35:07 +00:00
|
|
|
{
|
2017-07-27 15:05:50 +00:00
|
|
|
onSettingsChanged: Subscription;
|
2017-07-12 14:34:32 +00:00
|
|
|
layoutSettings: { navigation: string, toolbar: string, footer: string };
|
2017-07-12 12:35:07 +00:00
|
|
|
|
2017-07-13 14:43:22 +00:00
|
|
|
constructor(private layoutService: FuseLayoutService)
|
2017-07-12 12:35:07 +00:00
|
|
|
{
|
2017-07-27 15:05:50 +00:00
|
|
|
this.onSettingsChanged =
|
|
|
|
this.layoutService.onSettingsChanged
|
|
|
|
.subscribe(
|
|
|
|
(newSettings) => {
|
|
|
|
this.layoutSettings = newSettings;
|
|
|
|
}
|
|
|
|
);
|
2017-07-12 12:35:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ngOnInit()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-07-27 15:05:50 +00:00
|
|
|
ngOnDestroy()
|
|
|
|
{
|
|
|
|
this.onSettingsChanged.unsubscribe();
|
|
|
|
}
|
2017-07-12 12:35:07 +00:00
|
|
|
}
|