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-04 11:49:36 +03:00
|
|
|
|
2016-05-02 14:49:35 +03:00
|
|
|
@Component({
|
2016-05-18 17:04:35 +03:00
|
|
|
selector: 'ba-content-top',
|
|
|
|
|
styles: [require('./baContentTop.scss')],
|
|
|
|
|
template: require('./baContentTop.html'),
|
2016-05-02 14:49:35 +03:00
|
|
|
})
|
2016-05-18 17:04:35 +03:00
|
|
|
export class BaContentTop {
|
|
|
|
|
|
|
|
|
|
public activePageTitle:string = '';
|
2016-05-02 14:49:35 +03:00
|
|
|
|
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
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|