ngx-admin/src/app/theme/components/contentTop/contentTop.component.ts

21 lines
465 B
TypeScript
Raw Normal View History

2016-05-11 17:38:01 +03:00
import {Component} from '@angular/core';
2016-05-02 14:49:35 +03:00
2016-05-13 13:34:55 +03:00
import {AppState} from "../../../app.state";
2016-05-02 14:49:35 +03:00
@Component({
selector: 'content-top',
styles: [require('./contentTop.scss')],
template: require('./contentTop.html'),
})
export class ContentTop {
activePageTitle = '';
2016-05-13 13:34:55 +03:00
constructor(private _state:AppState) {
this._state.subscribe('menu.activeLink', (activeLink) => {
2016-05-13 18:40:34 +03:00
if (activeLink) {
this.activePageTitle = activeLink.title;
}
2016-05-02 14:49:35 +03:00
});
}
}