import { Injector, Component, OnInit } from '@angular/core'; import { Config } from '../../shared/core/index'; const noble = window['require']('noble'); @Component({ moduleId: module.id, selector: 'sd-about', templateUrl: 'about.component.html', styleUrls: [ 'about.component.css', ], }) export class AboutComponent implements OnInit { state = ''; // Just one way you could handle the {N} `ui/page` Page class // in a shared component... private _page: any; private get page() { if (Config.PageClass) { if (!this._page) { this._page = this.injector.get(Config.PageClass); } return this._page; } } constructor(private injector: Injector) { // This is here as an example // if (this.page) { // this.page.actionBarHidden = true; // } } ngOnInit() { noble.on('stateChanged', state => { this.state = state; }); } }