diff --git a/aio/content/examples/.gitignore b/aio/content/examples/.gitignore index 7833b847ed..5a298caef9 100644 --- a/aio/content/examples/.gitignore +++ b/aio/content/examples/.gitignore @@ -1,8 +1,22 @@ # boilerplate files +**/src/environments/environment.prod.ts +**/src/environments/environment.ts +**/src/assets/.gitkeep **/src/styles.css **/src/systemjs-angular-loader.js **/src/systemjs.config.js **/src/tsconfig.json +**/src/favicon.ico +**/src/polyfills.ts +**/src/test.ts +**/src/tsconfig.app.json +**/src/tsconfig.spec.json +**/src/typings.d.ts +**/e2e/app.po.ts +**/e2e/tsconfig.e2e.json +**/.angular-cli.json +**/.editorconfig +**/tsconfig.json **/bs-config.e2e.json **/bs-config.json **/package.json @@ -53,14 +67,18 @@ dist/ # testing !testing/src/browser-test-shim.js -!testing/karma*.js # webpack !webpack/**/config/*.js !webpack/**/*webpack*.js +!webpack/src/polyfills.ts # styleguide !styleguide/src/systemjs.custom.js # plunkers *plnkr.no-link.html + +# ngUpgrade testing +!upgrade-phonecat-*/**/karma.conf.js +!upgrade-phonecat-*/**/karma-test-shim.js diff --git a/aio/content/examples/ajs-quick-reference/e2e-spec.ts b/aio/content/examples/ajs-quick-reference/e2e/app.e2e-spec.ts similarity index 94% rename from aio/content/examples/ajs-quick-reference/e2e-spec.ts rename to aio/content/examples/ajs-quick-reference/e2e/app.e2e-spec.ts index 81a5faa5e7..e27f56e68b 100644 --- a/aio/content/examples/ajs-quick-reference/e2e-spec.ts +++ b/aio/content/examples/ajs-quick-reference/e2e/app.e2e-spec.ts @@ -83,7 +83,7 @@ describe('AngularJS to Angular Quick Reference Tests', function () { } function testPosterButtonClick(expectedButtonText: string, isDisplayed: boolean) { - let posterButton = element(by.css('movie-list tr > th > button')); + let posterButton = element(by.css('app-movie-list tr > th > button')); expect(posterButton.getText()).toBe(expectedButtonText); posterButton.click().then(function () { @@ -92,11 +92,11 @@ describe('AngularJS to Angular Quick Reference Tests', function () { } function getMovieRows() { - return element.all(by.css('movie-list tbody > tr')); + return element.all(by.css('app-movie-list tbody > tr')); } function testFavoriteHero(heroName: string, expectedLabel: string) { - let movieListComp = element(by.tagName('movie-list')); + let movieListComp = element(by.tagName('app-movie-list')); let heroInput = movieListComp.element(by.tagName('input')); let favoriteHeroLabel = movieListComp.element(by.tagName('h3')); let resultLabel = movieListComp.element(by.css('span > p')); diff --git a/aio/content/examples/ajs-quick-reference/src/app/app.component.ts b/aio/content/examples/ajs-quick-reference/src/app/app.component.ts index 91091026ad..6c5de8624e 100644 --- a/aio/content/examples/ajs-quick-reference/src/app/app.component.ts +++ b/aio/content/examples/ajs-quick-reference/src/app/app.component.ts @@ -4,7 +4,7 @@ import { MovieService } from './movie.service'; import { IMovie } from './movie'; @Component({ - selector: 'my-app', + selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ], providers: [ MovieService ] diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts index fa71f7a7ab..9955550c8d 100644 --- a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts +++ b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts @@ -8,7 +8,7 @@ import { MovieService } from './movie.service'; // #docregion component @Component({ - selector: 'movie-list', + selector: 'app-movie-list', templateUrl: './movie-list.component.html', // #docregion style-url styleUrls: [ './movie-list.component.css' ], diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts b/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts index 404fd4454c..887774d570 100644 --- a/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts +++ b/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts @@ -8,7 +8,7 @@ export class MovieService { return [ { hero: 'Celeritas', - imageurl: 'images/hero.png', + imageurl: 'assets/images/hero.png', movieId: 1, mpaa: 'pg-13', releaseDate: '2015-12-19T00:00:00', @@ -19,7 +19,7 @@ export class MovieService { }, { hero: 'Mr. Nice', - imageurl: 'images/villain.png', + imageurl: 'assets/images/villain.png', movieId: 2, mpaa: 'pg-13', releaseDate: '2015-12-18T00:00:00', @@ -30,7 +30,7 @@ export class MovieService { }, { hero: 'Angular', - imageurl: 'images/ng-logo.png', + imageurl: 'assets/images/ng-logo.png', movieId: 3, mpaa: 'pg-13', releaseDate: '2015-12-17T00:00:00', diff --git a/aio/content/examples/ajs-quick-reference/src/images/hero.png b/aio/content/examples/ajs-quick-reference/src/assets/images/hero.png similarity index 100% rename from aio/content/examples/ajs-quick-reference/src/images/hero.png rename to aio/content/examples/ajs-quick-reference/src/assets/images/hero.png diff --git a/aio/content/examples/ajs-quick-reference/src/images/ng-logo.png b/aio/content/examples/ajs-quick-reference/src/assets/images/ng-logo.png similarity index 100% rename from aio/content/examples/ajs-quick-reference/src/images/ng-logo.png rename to aio/content/examples/ajs-quick-reference/src/assets/images/ng-logo.png diff --git a/aio/content/examples/ajs-quick-reference/src/images/villain.png b/aio/content/examples/ajs-quick-reference/src/assets/images/villain.png similarity index 100% rename from aio/content/examples/ajs-quick-reference/src/images/villain.png rename to aio/content/examples/ajs-quick-reference/src/assets/images/villain.png diff --git a/aio/content/examples/ajs-quick-reference/src/index.html b/aio/content/examples/ajs-quick-reference/src/index.html index 829f080ae3..9f786cb6aa 100644 --- a/aio/content/examples/ajs-quick-reference/src/index.html +++ b/aio/content/examples/ajs-quick-reference/src/index.html @@ -1,5 +1,5 @@ - + @@ -8,21 +8,10 @@ - - - - - - - - - - Loading app... + diff --git a/aio/content/examples/ajs-quick-reference/src/main.ts b/aio/content/examples/ajs-quick-reference/src/main.ts index 6b6532d428..0740658908 100644 --- a/aio/content/examples/ajs-quick-reference/src/main.ts +++ b/aio/content/examples/ajs-quick-reference/src/main.ts @@ -1,5 +1,12 @@ // #docregion +import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/animations/e2e-spec.ts b/aio/content/examples/animations/e2e/app.e2e-spec.ts similarity index 92% rename from aio/content/examples/animations/e2e-spec.ts rename to aio/content/examples/animations/e2e/app.e2e-spec.ts index 4fba7ec475..fc0f40f9fc 100644 --- a/aio/content/examples/animations/e2e-spec.ts +++ b/aio/content/examples/animations/e2e/app.e2e-spec.ts @@ -29,7 +29,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-basic')); + host = element(by.css('app-hero-list-basic')); }); it('animates between active and inactive', () => { @@ -58,7 +58,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(function() { - host = element(by.css('hero-list-inline-styles')); + host = element(by.css('app-hero-list-inline-styles')); }); it('are not kept after animation', () => { @@ -79,7 +79,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-combined-transitions')); + host = element(by.css('app-hero-list-combined-transitions')); }); it('animates between active and inactive', () => { @@ -108,7 +108,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-twoway')); + host = element(by.css('app-hero-list-twoway')); }); it('animates between active and inactive', () => { @@ -137,7 +137,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-enter-leave')); + host = element(by.css('app-hero-list-enter-leave')); }); it('adds and removes element', () => { @@ -157,7 +157,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(function() { - host = element(by.css('hero-list-enter-leave-states')); + host = element(by.css('app-hero-list-enter-leave-states')); }); it('adds and removes and animates between active and inactive', () => { @@ -186,7 +186,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(function() { - host = element(by.css('hero-list-auto')); + host = element(by.css('app-hero-list-auto')); }); it('adds and removes element', () => { @@ -206,7 +206,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-timings')); + host = element(by.css('app-hero-list-timings')); }); it('adds and removes element', () => { @@ -227,7 +227,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-multistep')); + host = element(by.css('app-hero-list-multistep')); }); it('adds and removes element', () => { @@ -248,7 +248,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-groups')); + host = element(by.css('app-hero-list-groups')); }); it('adds and removes element', () => { @@ -269,7 +269,7 @@ describe('Animation Tests', () => { let host: ElementFinder; beforeEach(() => { - host = element(by.css('hero-list-basic')); + host = element(by.css('app-hero-list-basic')); }); it('animates between active and inactive', () => { diff --git a/aio/content/examples/animations/src/app/hero-list-auto.component.ts b/aio/content/examples/animations/src/app/hero-list-auto.component.ts index 6c9b70ff4d..97a5ff99de 100644 --- a/aio/content/examples/animations/src/app/hero-list-auto.component.ts +++ b/aio/content/examples/animations/src/app/hero-list-auto.component.ts @@ -13,7 +13,7 @@ import { import { Hero } from './hero.service'; @Component({ - selector: 'hero-list-auto', + selector: 'app-hero-list-auto', // #docregion template template: `