From 433167503c9dd99927441cd706af96aca832955f Mon Sep 17 00:00:00 2001 From: erdemcaygor Date: Mon, 21 Apr 2025 11:28:56 +0300 Subject: [PATCH] refactoring --- .../packages/schematics/src/commands/create-lib/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts b/npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts index 4d3927f015..01eb241dbe 100644 --- a/npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts +++ b/npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts @@ -322,7 +322,8 @@ export function addRoutingToAppRoutingModule( return; } const appRoutingModuleContent = appRoutingModule.toString(); - if (appRoutingModuleContent.includes(moduleName)) { + const routeExpr = options.templateType === 'standalone' ? `${macroName}_ROUTES` : moduleName; + if (appRoutingModuleContent.includes(routeExpr)) { return; }