mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-29 04:36:11 +01:00
feat(rc5): update to angular rc.5
- NgaModule - module wrapper for all ng2-admin custom features - Ng Module per page - async components load - menu moved (again) to a separate file (as now each module has its own route file) - no need to import Ba* directives into the pages which have NgaModule in the import statement
This commit is contained in:
parent
983f6f1675
commit
5b7c132eac
86 changed files with 854 additions and 384 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import {Component, ViewEncapsulation, Input, Output, EventEmitter} from '@angular/core';
|
||||
import {Router, RouterConfig, NavigationEnd} from '@angular/router';
|
||||
import {Router, Routes, NavigationEnd} from '@angular/router';
|
||||
import {Subscription} from 'rxjs/Rx';
|
||||
|
||||
import {BaSlimScroll} from '../../../theme/directives';
|
||||
import {BaMenuService} from './baMenu.service';
|
||||
import {BaMenuItem} from './components/baMenuItem';
|
||||
import {AppState} from '../../../app.state';
|
||||
import {GlobalState} from '../../../global.state';
|
||||
|
||||
@Component({
|
||||
selector: 'ba-menu',
|
||||
|
|
@ -17,7 +17,7 @@ import {AppState} from '../../../app.state';
|
|||
})
|
||||
export class BaMenu {
|
||||
|
||||
@Input() menuRoutes:RouterConfig = [];
|
||||
@Input() menuRoutes:Routes = [];
|
||||
@Input() sidebarCollapsed:boolean = false;
|
||||
@Input() menuHeight:number;
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ export class BaMenu {
|
|||
protected _onRouteChange:Subscription;
|
||||
public outOfArea:number = -200;
|
||||
|
||||
constructor(private _router:Router, private _service:BaMenuService, private _state:AppState) {
|
||||
constructor(private _router:Router, private _service:BaMenuService, private _state:GlobalState) {
|
||||
this._onRouteChange = this._router.events.subscribe((event) => {
|
||||
|
||||
if (event instanceof NavigationEnd) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Router, UrlTree, RouterConfig} from '@angular/router';
|
||||
import {Router, Routes} from '@angular/router';
|
||||
|
||||
@Injectable()
|
||||
export class BaMenuService {
|
||||
|
|
@ -9,7 +9,7 @@ export class BaMenuService {
|
|||
constructor(private _router:Router) {
|
||||
}
|
||||
|
||||
public convertRoutesToMenus(routes:RouterConfig):any[] {
|
||||
public convertRoutesToMenus(routes:Routes):any[] {
|
||||
let items = this._convertArrayToItems(routes);
|
||||
return this._skipEmpty(items);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue