/app
- app.component.ts
- app.component.html (hide/show: menu bar)
- app.global.service.ts (Public varible LoginSuccess:boolean)
- m
As of final release (Angular 2.0.0) :
Import the service and inject it in the providers array like so :
import { GlobalService } from './app.global.service';
//further down:
@NgModule({
bootstrap: [ App ],
declarations: [
// Your components should go here
],
imports: [
// Your module imports should go here
],
providers: [
ENV_PROVIDERS // By Angular
// Your providers should go here, i.e.
GlobalService
]
});