Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 19 additions & 1 deletion aio/content/examples/.gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!@#$%^&* style guide 😛

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hear you

expect(posterButton.getText()).toBe(expectedButtonText);

posterButton.click().then(function () {
Expand All @@ -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'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
15 changes: 2 additions & 13 deletions aio/content/examples/ajs-quick-reference/src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<base href="/">
<meta charset="UTF-8">
Expand All @@ -8,21 +8,10 @@
<!-- #docregion style -->
<link rel="stylesheet" href="styles.css">
<!-- #enddocregion style -->

<!-- Polyfills -->
<script src="node_modules/core-js/client/shim.min.js"></script>

<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>

<script src="systemjs.config.js"></script>
<script>
System.import('main.js').catch(function(err){ console.error(err); });
</script>
</head>

<body>
<my-app>Loading app...</my-app>
<app-root></app-root>
</body>

</html>
7 changes: 7 additions & 0 deletions aio/content/examples/ajs-quick-reference/src/main.ts
Original file line number Diff line number Diff line change
@@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-auto',
selector: 'app-hero-list-auto',
// #docregion template
template: `
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-basic',
selector: 'app-hero-list-basic',
// #enddocregion
/* The click event calls hero.toggleState(), which
* causes the state of that hero to switch from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-combined-transitions',
selector: 'app-hero-list-combined-transitions',
// #docregion template
template: `
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-enter-leave-states',
selector: 'app-hero-list-enter-leave-states',
// #docregion template
template: `
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-enter-leave',
selector: 'app-hero-list-enter-leave',
// #docregion template
template: `
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-groups',
selector: 'app-hero-list-groups',
template: `
<ul>
<li *ngFor="let hero of heroes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-inline-styles',
selector: 'app-hero-list-inline-styles',
// #docregion template
template: `
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-multistep',
selector: 'app-hero-list-multistep',
// #docregion template
template: `
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-timings',
selector: 'app-hero-list-timings',
template: `
<ul>
<li *ngFor="let hero of heroes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { Hero } from './hero.service';

@Component({
selector: 'hero-list-twoway',
selector: 'app-hero-list-twoway',
// #docregion template
template: `
<ul>
Expand Down
Loading