code reformat to follow the styles

This commit is contained in:
nixa 2016-04-29 17:27:19 +03:00
parent 669b3df4b5
commit a8cd300ecc
26 changed files with 193 additions and 187 deletions

View file

@ -1,6 +1,3 @@
/*
* Angular 2 decorators and services
*/
import {Component, ViewEncapsulation} from 'angular2/core';
import {RouteConfig, Router} from 'angular2/router';
import {Subscription} from 'rxjs/Subscription';
@ -12,17 +9,17 @@ import {Pages} from './pages';
// TODO: is it really the best place to globally require that dependency?
require("!style!css!sass!./theme/sass/_ionicons.scss");
/*
* App Component
* Top Level Component
* TODO: why the header and footer are not implemented?
*/
/*
* App Component
* Top Level Component
* TODO: why the header and footer are not implemented?
*/
@Component({
selector: 'app',
pipes: [ ],
pipes: [],
providers: [SidebarStateService],
encapsulation: ViewEncapsulation.None,
styles: [ require('normalize.css'), require('./app.scss') ],
styles: [require('normalize.css'), require('./app.scss')],
template: `
<header>
</header>
@ -46,15 +43,15 @@ require("!style!css!sass!./theme/sass/_ionicons.scss");
])
export class App {
isMenuCollapsed: boolean = false;
isMenuCollapsed:boolean = false;
private _sidebarStateSubscription: Subscription;
private _sidebarStateSubscription:Subscription;
constructor(private _sidebarStateService:SidebarStateService) {
this._sidebarStateSubscription = this._sidebarStateService.getStateStream().subscribe((isCollapsed) => this.isMenuCollapsed = isCollapsed);
}
ngOnDestroy(){
ngOnDestroy() {
// prevent memory leak when component destroyed
this._sidebarStateSubscription.unsubscribe();
}