fuse-angular/src/app/core/components/layout/layout.component.ts

31 lines
823 B
TypeScript
Raw Normal View History

2017-07-15 15:03:40 +00:00
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
2017-07-13 14:43:22 +00:00
import { FuseLayoutService } from '../../services/layout.service';
2017-07-12 12:35:07 +00:00
@Component({
2017-07-15 15:03:40 +00:00
selector : 'fuse-layout',
templateUrl : './layout.component.html',
styleUrls : ['./layout.component.scss'],
encapsulation: ViewEncapsulation.None
2017-07-12 12:35:07 +00:00
})
2017-07-13 14:43:22 +00:00
export class FuseLayoutComponent implements OnInit
2017-07-12 12:35:07 +00:00
{
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
{
this.layoutSettings = layoutService.getSettings();
}
ngOnInit()
{
this.layoutService.onSettingsChanged
.subscribe(
(newSettings) =>
{
this.layoutSettings = newSettings;
}
);
}
}