From ffe1361a9a85e6a840fe8be0d2fe8c7f973c6580 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Sun, 1 May 2016 19:10:37 -0400 Subject: [PATCH] bug: update app component name to have 'Component' suffix Fixes #580 --- .../ng2/files/__path__/app/__name__.component.spec.ts | 6 +++--- .../blueprints/ng2/files/__path__/app/__name__.component.ts | 2 +- addon/ng2/blueprints/ng2/files/__path__/main.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts b/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts index 43fbd7e4929b..7e8b4ce21b78 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts @@ -10,12 +10,12 @@ import { ComponentFixture, TestComponentBuilder } from 'angular2/testing'; -import {<%= jsComponentName %>App} from '../app/<%= htmlComponentName %>.component'; +import {<%= jsComponentName %>AppComponent} from '../app/<%= htmlComponentName %>.component'; -beforeEachProviders(() => [<%= jsComponentName %>App]); +beforeEachProviders(() => [<%= jsComponentName %>AppComponent]); describe('App: <%= jsComponentName %>', () => { - it('should create the app', inject([<%= jsComponentName %>App], (app: <%= jsComponentName %>App) => { + it('should create the app', inject([<%= jsComponentName %>AppComponent], (app: <%= jsComponentName %>AppComponent) => { expect(app).toBeTruthy(); })); }); diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts b/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts index bd4671245f93..1845d68b3b81 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts @@ -6,5 +6,5 @@ import {Component} from 'angular2/core'; templateUrl: '<%= htmlComponentName %>.component.html', styleUrls: ['<%= dasherizedModuleName %>.component.<%= styleExt %>'] }) -export class <%= jsComponentName %>App { +export class <%= jsComponentName %>AppComponent { } diff --git a/addon/ng2/blueprints/ng2/files/__path__/main.ts b/addon/ng2/blueprints/ng2/files/__path__/main.ts index c1ff751cc525..7ac3d9caf220 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/main.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/main.ts @@ -1,10 +1,10 @@ import {bootstrap} from 'angular2/platform/browser'; import {enableProdMode} from 'angular2/core'; import {environment} from './app/environment'; -import {<%= jsComponentName %>App} from './app/<%= htmlComponentName %>.component'; +import {<%= jsComponentName %>AppComponent} from './app/<%= htmlComponentName %>.component'; if (environment.production) { enableProdMode(); } -bootstrap(<%= jsComponentName %>App); +bootstrap(<%= jsComponentName %>AppComponent);