mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-23 02:40:14 +01:00
project structure update for more accurate import
This commit is contained in:
parent
36288562e6
commit
945cdb7e4f
43 changed files with 47 additions and 42 deletions
25
src/app/theme/components/contentTop/contentTop.component.ts
Normal file
25
src/app/theme/components/contentTop/contentTop.component.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import {Component} from 'angular2/core';
|
||||
import {Subscription} from "rxjs/Subscription";
|
||||
|
||||
import {ThemeGlobal} from "../../../theme";
|
||||
|
||||
@Component({
|
||||
selector: 'content-top',
|
||||
styles: [require('./contentTop.scss')],
|
||||
template: require('./contentTop.html'),
|
||||
})
|
||||
export class ContentTop {
|
||||
activePageTitle = '';
|
||||
private _themeGlobalSubscription:Subscription;
|
||||
|
||||
constructor(private _themeGlobal:ThemeGlobal) {
|
||||
this._themeGlobalSubscription = this._themeGlobal.getDataStream().subscribe((data) => {
|
||||
this.activePageTitle = data['menu.activeLink'] != null ? data['menu.activeLink'].title : this.activePageTitle;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
// prevent memory leak when component destroyed
|
||||
this._themeGlobalSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue