Skip to content

Commit

Permalink
chore: add lazy route
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Roujinsky committed Jun 7, 2020
1 parent faf82b1 commit 1484f1a
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"@siemplify/ace-editor": "1.0.2",
"@siemplify/utils": "1.5.2",
"lodash-es": "4.17.15",
"rxjs": "~6.4.0",
Expand Down
2 changes: 2 additions & 0 deletions src/app/users/users.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<p>users works!</p>
<input [(ngModel)]="route" type="text"><br/>
<pre>{{route | moduleUrl}}</pre>
2 changes: 2 additions & 0 deletions src/app/users/users.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Component, OnInit } from '@angular/core';
})
export class UsersComponent implements OnInit {

route;

constructor() { }

ngOnInit() {
Expand Down
19 changes: 18 additions & 1 deletion src/app/users/users.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NavigationModule } from '../navigation/navigation.module';

import { UsersRoutingModule } from './users-routing.module';
import { UsersComponent } from './users.component';
Expand All @@ -9,7 +11,22 @@ import { UsersComponent } from './users.component';
declarations: [UsersComponent],
imports: [
CommonModule,
UsersRoutingModule
UsersRoutingModule,
NavigationModule.forChild({
baseRoute: 'users',
dataKey: 'data',
routes: [
{
id: 'user',
route: 'users/user'
},
{
id: 'test',
route: 'ext/test'
}
]
}),
FormsModule
]
})
export class UsersModule { }

0 comments on commit 1484f1a

Please sign in to comment.