diff --git a/addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts b/addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts index 3eb2e93e5f64..999059f8aa07 100644 --- a/addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts +++ b/addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts @@ -1,7 +1,7 @@ import { provide } from '@angular/core'; import { APP_BASE_HREF } from '@angular/common'; import { APP_SHELL_BUILD_PROVIDERS } from '@angular/app-shell'; -import { <%= jsComponentName %>AppComponent } from './app/'; +import { AppComponent } from './app/'; import { REQUEST_URL, ORIGIN_URL @@ -10,7 +10,7 @@ import { export const options = { directives: [ // The component that will become the main App Shell - <%= jsComponentName %>AppComponent + AppComponent ], platformProviders: [ APP_SHELL_BUILD_PROVIDERS, 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 deleted file mode 100644 index dff262b07022..000000000000 --- a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - beforeEachProviders, - describe, - expect, - it, - inject -} from '@angular/core/testing'; -import { <%= jsComponentName %>AppComponent } from '../app/<%= htmlComponentName %>.component'; - -beforeEachProviders(() => [<%= jsComponentName %>AppComponent]); - -describe('App: <%= jsComponentName %>', () => { - it('should create the app', - inject([<%= jsComponentName %>AppComponent], (app: <%= jsComponentName %>AppComponent) => { - expect(app).toBeTruthy(); - })); - - it('should have as title \'<%= htmlComponentName %> works!\'', - inject([<%= jsComponentName %>AppComponent], (app: <%= jsComponentName %>AppComponent) => { - expect(app.title).toEqual('<%= htmlComponentName %> works!'); - })); -}); diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.__styleext__ b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.__styleext__ similarity index 100% rename from addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.__styleext__ rename to addon/ng2/blueprints/ng2/files/__path__/app/app.component.__styleext__ diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.html b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.html similarity index 100% rename from addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.html rename to addon/ng2/blueprints/ng2/files/__path__/app/app.component.html diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/app.component.spec.ts b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.spec.ts new file mode 100644 index 000000000000..e5a8e63a4d96 --- /dev/null +++ b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.spec.ts @@ -0,0 +1,22 @@ +import { + beforeEachProviders, + describe, + expect, + it, + inject +} from '@angular/core/testing'; +import { AppComponent } from './app.component'; + +beforeEachProviders(() => [AppComponent]); + +describe('App: <%= jsComponentName %>', () => { + it('should create the app', + inject([AppComponent], (app: AppComponent) => { + expect(app).toBeTruthy(); + })); + + it('should have as title \'app works!\'', + inject([AppComponent], (app: AppComponent) => { + expect(app.title).toEqual('app works!'); + })); +}); diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts similarity index 56% rename from addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts rename to addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts index eee28ef5b129..7fd0dc4b197d 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/app/app.component.ts @@ -3,16 +3,16 @@ import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';<% } %> @Component({ moduleId: module.id, - selector: '<%= htmlComponentName %>-app', + selector: '<%= prefix %>-root', <% if (isMobile) { %>template: `

{{title}}

`, styles: [], - directives: [APP_SHELL_DIRECTIVES]<% } else { %>templateUrl: '<%= htmlComponentName %>.component.html', - styleUrls: ['<%= dasherizedModuleName %>.component.css']<% } %> + directives: [APP_SHELL_DIRECTIVES]<% } else { %>templateUrl: 'app.component.html', + styleUrls: ['app.component.css']<% } %> }) -export class <%= jsComponentName %>AppComponent { - title = '<%= htmlComponentName %> works!'; +export class AppComponent { + title = 'app works!'; } diff --git a/addon/ng2/blueprints/ng2/files/__path__/app/index.ts b/addon/ng2/blueprints/ng2/files/__path__/app/index.ts index f0f2d38acd4b..30c9dfb021b8 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/app/index.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/app/index.ts @@ -1,2 +1,2 @@ export * from './environment'; -export * from './<%= htmlComponentName %>.component'; +export * from './app.component'; diff --git a/addon/ng2/blueprints/ng2/files/__path__/index.html b/addon/ng2/blueprints/ng2/files/__path__/index.html index b738ddbdb1df..6c04040f8ac2 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/index.html +++ b/addon/ng2/blueprints/ng2/files/__path__/index.html @@ -29,7 +29,7 @@ <% } %> - <<%= htmlComponentName %>-app>Loading...-app> + <<%= prefix %>-root>Loading...-root> <% if (isMobile) { %> @@ -59,7 +59,5 @@ <% } %> - - diff --git a/addon/ng2/blueprints/ng2/files/__path__/main.ts b/addon/ng2/blueprints/ng2/files/__path__/main.ts index 7e3a658095d0..abc5a38e11b8 100644 --- a/addon/ng2/blueprints/ng2/files/__path__/main.ts +++ b/addon/ng2/blueprints/ng2/files/__path__/main.ts @@ -1,11 +1,11 @@ import { bootstrap } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; -import { <%= jsComponentName %>AppComponent, environment } from './app/';<% if(isMobile) { %> +import { AppComponent, environment } from './app/';<% if(isMobile) { %> import { APP_SHELL_RUNTIME_PROVIDERS } from '@angular/app-shell';<% } %> if (environment.production) { enableProdMode(); } -bootstrap(<%= jsComponentName %>AppComponent<% if(isMobile) { %>, [ APP_SHELL_RUNTIME_PROVIDERS ]<% } %>); +bootstrap(AppComponent<% if(isMobile) { %>, [ APP_SHELL_RUNTIME_PROVIDERS ]<% } %>);