feat(sidebar): add menu sidebar updating (#548)

* feat(sidebar): add menu sidebar updating

Relates to issue #236

* refactor(sidebar): move menu initialization into app component

Also fix BaMenuService provider (move it into module providers from component providers)

* refactor(sidebar): move baMenuService to services directory
This commit is contained in:
Grzegorz Rozdzialik 2016-12-20 09:22:57 +01:00 committed by Dmitry Nehaychik
parent b78e72dde9
commit 05e17d24df
9 changed files with 42 additions and 19 deletions

View file

@ -1,8 +1,6 @@
import {Component, ElementRef, HostListener, ViewEncapsulation} from '@angular/core';
import {GlobalState} from '../../../global.state';
import {layoutSizes} from '../../../theme';
import {MENU} from '../../../../app/app.menu';
import * as _ from 'lodash';
@Component({
selector: 'ba-sidebar',
@ -11,10 +9,6 @@ import * as _ from 'lodash';
template: require('./baSidebar.html')
})
export class BaSidebar {
// here we declare which routes we want to use as a menu in our sidebar
public routes = _.cloneDeep(MENU); // we're creating a deep copy since we are going to change that object
public menuHeight:number;
public isMenuCollapsed:boolean = false;
public isMenuShouldCollapsed:boolean = false;