Skip to content

Commit 28f5135

Browse files
MeligyMRHarrison
authored andcommitted
fix(generate): stop default browser error from ng new --routing
Close angular#2794
1 parent 78fc373 commit 28f5135

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)