Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submodules and components #9

Merged
merged 8 commits into from
Nov 24, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/app/tutorials/tutorials.router.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { TutorialsComponent } from './tutorials.component';
import { InputComponent } from './input/input.component';

const routes: Routes = [
{ path: '', component: TutorialsComponent },
{
path: '',
component: TutorialsComponent,
children: [
{ path: 'input', component: InputComponent },
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sub-module is loaded by the path tutorials , so path here is going to be tutorials/input and will render the component InputComponent

],
},
];

export const TutorialsRoutingModule = RouterModule.forChild(routes);