mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
fix(menu): fix inactive menu item
This commit is contained in:
parent
fbf20df964
commit
24687102cf
2 changed files with 8 additions and 11 deletions
|
|
@ -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';
|
||||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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: [],
|
||||
|
|
@ -28,9 +33,10 @@ import {Component} from '@angular/core';
|
|||
})
|
||||
export class Pages {
|
||||
|
||||
constructor() {
|
||||
constructor(private _menuService: BaMenuService,) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this._menuService.updateMenuByRoutes(<Routes>MENU);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue