fix(ng-core): add type error control

pull/1572/head
mehmet-erim 6 years ago
parent 492de784dc
commit 5f24fb86c7

@ -1,9 +1,9 @@
import { Injectable, Inject, InjectionToken, Type } from '@angular/core';
import { NgxsPlugin, setValue, actionMatcher, InitState, UpdateState, NgxsNextPluginFn } from '@ngxs/store';
import { Inject, Injectable, InjectionToken } from '@angular/core';
import { Router, Routes } from '@angular/router';
import { ABP } from '../models';
import { actionMatcher, InitState, NgxsNextPluginFn, NgxsPlugin, setValue, UpdateState } from '@ngxs/store';
import snq from 'snq';
import { setChildRoute, sortRoutes, organizeRoutes } from '../utils/route-utils';
import { ABP } from '../models';
import { organizeRoutes } from '../utils/route-utils';
export const NGXS_CONFIG_PLUGIN_OPTIONS = new InjectionToken('NGXS_CONFIG_PLUGIN_OPTIONS');
@ -45,7 +45,7 @@ function transformRoutes(routes: Routes = [], wrappers: ABP.FullRoute[] = []): a
wrappers = abpRoutes.filter(ar => ar.wrapper);
const transformed = [] as ABP.FullRoute[];
routes
.filter(route => route.component || route.loadChildren)
.filter(route => route.component || route.loadChildren || (route.data || {}).routes)
.forEach(route => {
const abpPackage = abpRoutes.find(abp => abp.path.toLowerCase() === route.path.toLowerCase());
const { length } = transformed;

Loading…
Cancel
Save