Browse Source

refactor: use ABP.Route type instead of ABP.FullRoute

pull/4377/head
Arman Ozak 6 years ago
parent
commit
9c0fe4c8e1
  1. 42
      npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/nav-items.component.ts

42
npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/nav-items.component.ts

@ -1,31 +1,31 @@
import {
Component,
AfterViewInit,
TrackByFunction,
TemplateRef,
ViewChild,
OnDestroy,
Input,
} from '@angular/core';
import { import {
ABP, ABP,
takeUntilDestroy, ApplicationConfiguration,
SetLanguage,
AuthService, AuthService,
ConfigState, ConfigState,
ApplicationConfiguration,
SessionState, SessionState,
SetLanguage,
takeUntilDestroy,
} from '@abp/ng.core'; } from '@abp/ng.core';
import { LayoutState } from '../../states/layout.state'; import {
import { Store, Select } from '@ngxs/store'; AfterViewInit,
import { eNavigationElementNames } from '../../enums/navigation-element-names'; Component,
import { AddNavigationElement } from '../../actions/layout.actions'; Input,
import { map, filter } from 'rxjs/operators'; OnDestroy,
import { Observable } from 'rxjs'; TemplateRef,
import { Layout } from '../../models/layout'; TrackByFunction,
ViewChild,
} from '@angular/core';
import { Navigate, RouterState } from '@ngxs/router-plugin'; import { Navigate, RouterState } from '@ngxs/router-plugin';
import snq from 'snq'; import { Select, Store } from '@ngxs/store';
import compare from 'just-compare'; import compare from 'just-compare';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import snq from 'snq';
import { AddNavigationElement } from '../../actions/layout.actions';
import { eNavigationElementNames } from '../../enums/navigation-element-names';
import { Layout } from '../../models/layout';
import { LayoutState } from '../../states/layout.state';
@Component({ @Component({
selector: 'abp-nav-items', selector: 'abp-nav-items',
@ -52,7 +52,7 @@ export class NavItemsComponent implements AfterViewInit, OnDestroy {
rightPartElements: TemplateRef<any>[] = []; rightPartElements: TemplateRef<any>[] = [];
trackByFn: TrackByFunction<ABP.FullRoute> = (_, element) => element; trackByFn: TrackByFunction<ABP.Route> = (_, element) => element.name;
get defaultLanguage$(): Observable<string> { get defaultLanguage$(): Observable<string> {
return this.languages$.pipe( return this.languages$.pipe(

Loading…
Cancel
Save