Skip to content

Commit 512f671

Browse files
add routes for apps
1 parent a92e77c commit 512f671

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,22 @@ Add aliases for apps to paths in tsconfig.base.json.
105105
"@angular-mfe-nx/ui": ["libs/ui/src/index.ts"]
106106
```
107107

108+
### Add Routes for apps
109+
110+
Note: ESLint error needs override:
111+
112+
```typescript
113+
export const appRoutes: Route[] = [
114+
{
115+
path: 'app-one',
116+
// eslint-disable-next-line @nx/enforce-module-boundaries
117+
loadComponent: () => import('@angular-mfe-nx/app-one/app.component').then(m => m.AppComponent)
118+
},
119+
{
120+
path: 'app-two',
121+
// eslint-disable-next-line @nx/enforce-module-boundaries
122+
loadComponent: () => import('@angular-mfe-nx/app-two/app.component').then(m => m.AppComponent)
123+
},
124+
];
125+
```
126+
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
import { Route } from '@angular/router';
22

3-
export const appRoutes: Route[] = [];
3+
export const appRoutes: Route[] = [
4+
{
5+
path: 'app-one',
6+
// eslint-disable-next-line @nx/enforce-module-boundaries
7+
loadComponent: () => import('@angular-mfe-nx/app-one/app.component').then(m => m.AppComponent)
8+
},
9+
{
10+
path: 'app-two',
11+
// eslint-disable-next-line @nx/enforce-module-boundaries
12+
loadComponent: () => import('@angular-mfe-nx/app-two/app.component').then(m => m.AppComponent)
13+
},
14+
];
15+

0 commit comments

Comments
 (0)