From f974d401f9fc826647b61539c5143045b432ccaa Mon Sep 17 00:00:00 2001 From: Meligy Date: Thu, 20 Oct 2016 16:01:21 +1100 Subject: [PATCH] fix(generate): stop default browser error from ng new --routing --- .../ng2/files/__path__/app/app-routing.module.ts | 7 ++++++- .../blueprints/ng2/files/__path__/app/app.component.html | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/angular-cli/blueprints/ng2/files/__path__/app/app-routing.module.ts b/packages/angular-cli/blueprints/ng2/files/__path__/app/app-routing.module.ts index 9e01aadffa7e..03f6daa60bec 100644 --- a/packages/angular-cli/blueprints/ng2/files/__path__/app/app-routing.module.ts +++ b/packages/angular-cli/blueprints/ng2/files/__path__/app/app-routing.module.ts @@ -1,7 +1,12 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; -const routes: Routes = []; +const routes: Routes = [ + { + path: '', + children: [] + } +]; @NgModule({ imports: [RouterModule.forRoot(routes)], diff --git a/packages/angular-cli/blueprints/ng2/files/__path__/app/app.component.html b/packages/angular-cli/blueprints/ng2/files/__path__/app/app.component.html index b6931b538a2c..4b7217733e92 100644 --- a/packages/angular-cli/blueprints/ng2/files/__path__/app/app.component.html +++ b/packages/angular-cli/blueprints/ng2/files/__path__/app/app.component.html @@ -1,3 +1,4 @@

{{title}} -

+<% if (routing) { %> +<% } %>