From f67c92f7f052ca535911b78f22da3a67d1bb647a Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Fri, 20 Dec 2019 09:57:43 +0300 Subject: [PATCH] chore(core): remove old route handling method --- .../packages/core/src/lib/plugins/config.plugin.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts b/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts index bcd226c941..a07b613b44 100644 --- a/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts +++ b/npm/ng-packs/packages/core/src/lib/plugins/config.plugin.ts @@ -50,14 +50,7 @@ export class ConfigPlugin implements NgxsPlugin { } function transformRoutes(routes: Routes = [], wrappers: ABP.FullRoute[] = []): any { - // TODO: remove in v1 - const oldAbpRoutes: ABP.FullRoute[] = routes - .filter(route => { - return snq(() => route.data.routes.routes.find(r => r.path === route.path), false); - }) - .reduce((acc, val) => [...acc, ...val.data.routes.routes], []); - // tslint:disable-next-line: deprecation - const abpRoutes = [...getAbpRoutes(), ...oldAbpRoutes]; + const abpRoutes = [...getAbpRoutes()]; wrappers = abpRoutes.filter(ar => ar.wrapper); const transformed = [] as ABP.FullRoute[]; @@ -89,8 +82,7 @@ function transformRoutes(routes: Routes = [], wrappers: ABP.FullRoute[] = []): a function setUrls(routes: ABP.FullRoute[], parentUrl?: string): ABP.FullRoute[] { if (parentUrl) { - // this if block using for only recursive call - + // recursive block return routes.map(route => ({ ...route, url: `${parentUrl}/${route.path}`,