mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
fixing navigation issue - creating deep copy of routes before working on
it. https://github.com/akveo/ng2-admin/issues/93
This commit is contained in:
parent
8340acec7a
commit
58219dca8e
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import {AppState} from '../../../app.state';
|
||||||
import {layoutSizes} from '../../../theme';
|
import {layoutSizes} from '../../../theme';
|
||||||
import {BaMenu} from '../baMenu';
|
import {BaMenu} from '../baMenu';
|
||||||
import {routes} from '../../../../app/app.routes';
|
import {routes} from '../../../../app/app.routes';
|
||||||
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ba-sidebar',
|
selector: 'ba-sidebar',
|
||||||
|
|
@ -15,7 +16,7 @@ import {routes} from '../../../../app/app.routes';
|
||||||
export class BaSidebar {
|
export class BaSidebar {
|
||||||
|
|
||||||
// here we declare which routes we want to use as a menu in our sidebar
|
// here we declare which routes we want to use as a menu in our sidebar
|
||||||
public routes = routes;
|
public routes = _.cloneDeep(routes); // we're creating a deep copy since we are going to change that object
|
||||||
|
|
||||||
public menuHeight:number;
|
public menuHeight:number;
|
||||||
public isMenuCollapsed:boolean = false;
|
public isMenuCollapsed:boolean = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue