Skip to content

Commit f974d40

Browse files
committed
fix(generate): stop default browser error from ng new --routing
1 parent 88131a0 commit f974d40

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/angular-cli/blueprints/ng2/files/__path__/app/app-routing.module.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

4-
const routes: Routes = [];
4+
const routes: Routes = [
5+
{
6+
path: '',
7+
children: []
8+
}
9+
];
510

611
@NgModule({
712
imports: [RouterModule.forRoot(routes)],
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<h1>
22
{{title}}
3-
</h1>
3+
</h1><% if (routing) { %>
4+
<router-outlet></router-outlet><% } %>

0 commit comments

Comments
 (0)