From 1bf3b4f2de2792ac836766e7d9d791652527c06e Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Wed, 27 Apr 2016 21:15:53 -0400 Subject: [PATCH] chore: clean up component blueprint for routes Clean up the inline template markup to not include a router-outlet tag --- .../component/files/__path__/__name__.component.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/addon/ng2/blueprints/component/files/__path__/__name__.component.ts b/addon/ng2/blueprints/component/files/__path__/__name__.component.ts index 91bd38361814..468d4b9de2c3 100644 --- a/addon/ng2/blueprints/component/files/__path__/__name__.component.ts +++ b/addon/ng2/blueprints/component/files/__path__/__name__.component.ts @@ -1,5 +1,4 @@ -import {Component, OnInit} from 'angular2/core';<% if (route) { %> -import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router';<% } %> +import {Component, OnInit} from 'angular2/core'; @Component({ moduleId: __moduleName, @@ -7,13 +6,11 @@ import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router' template: `

<%= dasherizedModuleName %> Works! -

<% if (route) { %> - <% } %> +

`,<% } else { %> templateUrl: '<%= dasherizedModuleName %>.component.html',<% } if(inlineStyle) { %> styles: []<% } else { %> - styleUrls: ['<%= dasherizedModuleName %>.component.<%= styleExt %>']<% } if (route) { %>, - directives: [ROUTER_DIRECTIVES]<% } %> + styleUrls: ['<%= dasherizedModuleName %>.component.<%= styleExt %>']<% } %> }) export class <%= classifiedModuleName %>Component implements OnInit {