Skip to content

Commit

Permalink
fix(menu): fix inactive menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zhukov committed Feb 1, 2017
1 parent fbf20df commit 2468710
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 0 additions & 9 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { Routes } from '@angular/router';
import { Component, ViewContainerRef } from '@angular/core';

import { GlobalState } from './global.state';
import { BaImageLoaderService, BaThemePreloader, BaThemeSpinner } from './theme/services';
import { layoutPaths } from './theme/theme.constants';
import { BaThemeConfig } from './theme/theme.config';
import { BaMenuService } from './theme';

import { MENU } from './app.menu';

import 'style-loader!./app.scss';
import 'style-loader!./theme/initial.scss';
Expand All @@ -32,12 +27,8 @@ export class App {
constructor(private _state: GlobalState,
private _imageLoader: BaImageLoaderService,
private _spinner: BaThemeSpinner,
private _config: BaThemeConfig,
private _menuService: BaMenuService,
private viewContainerRef: ViewContainerRef) {

this._menuService.updateMenuByRoutes(<Routes>MENU);

this._loadImages();

this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
Expand Down
10 changes: 8 additions & 2 deletions src/app/pages/pages.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {Component} from '@angular/core';
import { Component } from '@angular/core';
import { Routes } from '@angular/router';

import { BaMenuService } from '../theme';
import { MENU } from '../app.menu';

@Component({
selector: 'pages',
styles: [],
Expand Down Expand Up @@ -28,9 +33,10 @@ import {Component} from '@angular/core';
})
export class Pages {

constructor() {
constructor(private _menuService: BaMenuService,) {
}

ngOnInit() {
this._menuService.updateMenuByRoutes(<Routes>MENU);
}
}

0 comments on commit 2468710

Please sign in to comment.