build: adding basic e2e testing infrastructure
This commit is contained in:
parent
fdd8bd1a36
commit
2e1f3f003d
@ -38,8 +38,7 @@ env:
|
|||||||
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
||||||
- CI_MODE=js
|
- CI_MODE=js
|
||||||
- CI_MODE=lint
|
- CI_MODE=lint
|
||||||
# - CI_MODE=dart
|
- CI_MODE=e2e
|
||||||
- CI_MODE=build_only
|
|
||||||
- CI_MODE=saucelabs_required
|
- CI_MODE=saucelabs_required
|
||||||
- CI_MODE=browserstack_required
|
- CI_MODE=browserstack_required
|
||||||
|
|
||||||
|
19
build.sh
19
build.sh
@ -8,6 +8,25 @@ cd `dirname $0`
|
|||||||
TSCONFIG=./modules/tsconfig.json
|
TSCONFIG=./modules/tsconfig.json
|
||||||
echo "====== (all)COMPILING: \$(npm bin)/ng2tc -p ${TSCONFIG} ====="
|
echo "====== (all)COMPILING: \$(npm bin)/ng2tc -p ${TSCONFIG} ====="
|
||||||
rm -rf ./dist/all/
|
rm -rf ./dist/all/
|
||||||
|
mkdir ./dist/all/
|
||||||
|
|
||||||
|
# prepare all files for e2e tests
|
||||||
|
cp -r ./modules/playground ./dist/all/
|
||||||
|
cp -r ./modules/playground/favicon.ico ./dist/
|
||||||
|
#rsync -aP ./modules/playground/* ./dist/all/playground/
|
||||||
|
mkdir ./dist/all/playground/vendor
|
||||||
|
cd ./dist/all/playground/vendor
|
||||||
|
ln -s ../../../../node_modules/es6-shim/es6-shim.js .
|
||||||
|
ln -s ../../../../node_modules/zone.js/dist/zone.js .
|
||||||
|
ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js .
|
||||||
|
ln -s ../../../../node_modules/systemjs/dist/system.src.js .
|
||||||
|
ln -s ../../../../node_modules/base64-js/lib/b64.js .
|
||||||
|
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
||||||
|
ln -s ../../../../node_modules/rxjs/bundles/Rx.js .
|
||||||
|
ln -s ../../../../node_modules/angular/angular.js .
|
||||||
|
cd -
|
||||||
|
|
||||||
|
# compile ts code
|
||||||
$(npm bin)/ng2tc -p ${TSCONFIG}
|
$(npm bin)/ng2tc -p ${TSCONFIG}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('async', () => {
|
describe('async', () => {
|
||||||
var URL = 'playground/src/async/index.html';
|
var URL = 'all/playground/src/async/index.html';
|
||||||
|
|
||||||
beforeEach(() => browser.get(URL));
|
beforeEach(() => browser.get(URL));
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
function waitForElement(selector) {
|
function waitForElement(selector) {
|
||||||
var EC = (<any>protractor).ExpectedConditions;
|
var EC = (<any>protractor).ExpectedConditions;
|
||||||
@ -9,7 +9,7 @@ function waitForElement(selector) {
|
|||||||
describe('hash routing example app', function() {
|
describe('hash routing example app', function() {
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
var URL = 'playground/src/hash_routing/index.html';
|
var URL = 'all/playground/src/hash_routing/index.html';
|
||||||
|
|
||||||
it('should navigate between routes', function() {
|
it('should navigate between routes', function() {
|
||||||
browser.get(URL + '#/bye');
|
browser.get(URL + '#/bye');
|
||||||
@ -28,7 +28,7 @@ describe('hash routing example app', function() {
|
|||||||
|
|
||||||
|
|
||||||
it('should open in new window if target is _blank', () => {
|
it('should open in new window if target is _blank', () => {
|
||||||
var URL = 'playground/src/hash_routing/index.html';
|
var URL = 'all/playground/src/hash_routing/index.html';
|
||||||
browser.get(URL + '#/');
|
browser.get(URL + '#/');
|
||||||
waitForElement('hello-cmp');
|
waitForElement('hello-cmp');
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('hello world', function() {
|
describe('hello world', function() {
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
describe('hello world app', function() {
|
describe('hello world app', function() {
|
||||||
var URL = 'playground/src/hello_world/index.html';
|
var URL = 'all/playground/src/hello_world/index.html';
|
||||||
|
|
||||||
it('should greet', function() {
|
it('should greet', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('http', function() {
|
describe('http', function() {
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
describe('fetching', function() {
|
describe('fetching', function() {
|
||||||
var URL = 'playground/src/http/index.html';
|
var URL = 'all/playground/src/http/index.html';
|
||||||
|
|
||||||
it('should fetch and display people', function() {
|
it('should fetch and display people', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('jsonp', function() {
|
describe('jsonp', function() {
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
describe('fetching', function() {
|
describe('fetching', function() {
|
||||||
var URL = 'playground/src/jsonp/index.html';
|
var URL = 'all/playground/src/jsonp/index.html';
|
||||||
|
|
||||||
it('should fetch and display people', function() {
|
it('should fetch and display people', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -2,7 +2,7 @@ import {verifyNoBrowserErrors} from '@angular/platform-browser/testing/e2e_util'
|
|||||||
|
|
||||||
describe('key_events', function() {
|
describe('key_events', function() {
|
||||||
|
|
||||||
var URL = 'playground/src/key_events/index.html';
|
var URL = 'all/playground/src/key_events/index.html?bundles=false';
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
beforeEach(() => { browser.get(URL); });
|
beforeEach(() => { browser.get(URL); });
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('Model-Driven Forms', function() {
|
describe('Model-Driven Forms', function() {
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
var URL = 'playground/src/model_driven_forms/index.html';
|
var URL = 'all/playground/src/model_driven_forms/index.html';
|
||||||
|
|
||||||
it('should display errors', function() {
|
it('should display errors', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('Order Management CRUD', function() {
|
describe('Order Management CRUD', function() {
|
||||||
var URL = 'playground/src/order_management/index.html';
|
var URL = 'all/playground/src/order_management/index.html';
|
||||||
|
|
||||||
it('should work', function() {
|
it('should work', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('Person Management CRUD', function() {
|
describe('Person Management CRUD', function() {
|
||||||
var URL = 'playground/src/person_management/index.html';
|
var URL = 'all/playground/src/person_management/index.html';
|
||||||
|
|
||||||
it('should work', function() {
|
it('should work', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
function waitForElement(selector) {
|
function waitForElement(selector) {
|
||||||
var EC = (<any>protractor).ExpectedConditions;
|
var EC = (<any>protractor).ExpectedConditions;
|
||||||
@ -10,7 +10,7 @@ describe('relative assets relative-app', () => {
|
|||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
var URL = 'playground/src/relative_assets/';
|
var URL = 'all/playground/src/relative_assets/';
|
||||||
|
|
||||||
it('should load in the templateUrl relative to the my-cmp component', () => {
|
it('should load in the templateUrl relative to the my-cmp component', () => {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
function waitForElement(selector) {
|
function waitForElement(selector) {
|
||||||
var EC = (<any>protractor).ExpectedConditions;
|
var EC = (<any>protractor).ExpectedConditions;
|
||||||
@ -11,7 +11,7 @@ describe('routing inbox-app', () => {
|
|||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
describe('index view', () => {
|
describe('index view', () => {
|
||||||
var URL = 'playground/src/routing/';
|
var URL = 'all/playground/src/routing/';
|
||||||
|
|
||||||
it('should list out the current collection of items', () => {
|
it('should list out the current collection of items', () => {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
@ -31,7 +31,7 @@ describe('routing inbox-app', () => {
|
|||||||
|
|
||||||
|
|
||||||
describe('drafts view', () => {
|
describe('drafts view', () => {
|
||||||
var URL = 'playground/src/routing/#/drafts';
|
var URL = 'all/playground/src/routing/#/drafts';
|
||||||
|
|
||||||
it('should navigate to the drafts view when the drafts link is clicked', () => {
|
it('should navigate to the drafts view when the drafts link is clicked', () => {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
@ -55,7 +55,7 @@ describe('routing inbox-app', () => {
|
|||||||
|
|
||||||
|
|
||||||
describe('detail view', () => {
|
describe('detail view', () => {
|
||||||
var URL = 'playground/src/routing/';
|
var URL = 'all/playground/src/routing/';
|
||||||
|
|
||||||
it('should navigate to the detail view when an email is clicked', () => {
|
it('should navigate to the detail view when an email is clicked', () => {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import * as testUtil from '@angular/testing/src/e2e_util';
|
import * as testUtil from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var sourceMap = require('source-map');
|
var sourceMap = require('source-map');
|
||||||
|
|
||||||
describe('sourcemaps', function() {
|
describe('sourcemaps', function() {
|
||||||
var URL = 'playground/src/sourcemap/index.html';
|
var URL = 'all/playground/src/sourcemap/index.html';
|
||||||
|
|
||||||
it('should map sources', function() {
|
it('should map sources', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
@ -30,7 +30,7 @@ describe('sourcemaps', function() {
|
|||||||
|
|
||||||
|
|
||||||
const content =
|
const content =
|
||||||
fs.readFileSync('dist/js/dev/es5/playground/src/sourcemap/index.js').toString("utf8");
|
fs.readFileSync('dist/all/playground/src/sourcemap/index.js').toString("utf8");
|
||||||
const marker = "//# sourceMappingURL=data:application/json;base64,";
|
const marker = "//# sourceMappingURL=data:application/json;base64,";
|
||||||
const index = content.indexOf(marker);
|
const index = content.indexOf(marker);
|
||||||
const sourceMapData =
|
const sourceMapData =
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('SVG', function() {
|
describe('SVG', function() {
|
||||||
|
|
||||||
var URL = 'playground/src/svg/index.html';
|
var URL = 'all/playground/src/svg/index.html';
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
beforeEach(() => { browser.get(URL); });
|
beforeEach(() => { browser.get(URL); });
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('Template-Driven Forms', function() {
|
describe('Template-Driven Forms', function() {
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
var URL = 'playground/src/template_driven_forms/index.html';
|
var URL = 'all/playground/src/template_driven_forms/index.html';
|
||||||
|
|
||||||
it('should display errors', function() {
|
it('should display errors', function() {
|
||||||
browser.get(URL);
|
browser.get(URL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('WebWorkers Input', function() {
|
describe('WebWorkers Input', function() {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@ -6,7 +6,7 @@ describe('WebWorkers Input', function() {
|
|||||||
browser.ignoreSynchronization = false;
|
browser.ignoreSynchronization = false;
|
||||||
});
|
});
|
||||||
const selector = 'input-app';
|
const selector = 'input-app';
|
||||||
const URL = 'playground/src/web_workers/input/index.html';
|
const URL = 'all/playground/src/web_workers/input/index.html';
|
||||||
const VALUE = 'test val';
|
const VALUE = 'test val';
|
||||||
|
|
||||||
it('should bootstrap', () => {
|
it('should bootstrap', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('WebWorkers Kitchen Sink', function() {
|
describe('WebWorkers Kitchen Sink', function() {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@ -6,7 +6,7 @@ describe('WebWorkers Kitchen Sink', function() {
|
|||||||
browser.ignoreSynchronization = false;
|
browser.ignoreSynchronization = false;
|
||||||
});
|
});
|
||||||
var selector = "hello-app .greeting";
|
var selector = "hello-app .greeting";
|
||||||
var URL = "playground/src/web_workers/kitchen_sink/index.html";
|
var URL = 'all/playground/src/web_workers/kitchen_sink/index.html';
|
||||||
|
|
||||||
it('should greet', () => {
|
it('should greet', () => {
|
||||||
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
|
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
import {PromiseWrapper} from '@angular/facade';
|
|
||||||
|
|
||||||
var URL = 'playground/src/web_workers/message_broker/index.html';
|
var URL = 'all/playground/src/web_workers/message_broker/index.html';
|
||||||
|
|
||||||
describe("MessageBroker", function() {
|
describe("MessageBroker", function() {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe("WebWorker Router", () => {
|
describe("WebWorker Router", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@ -14,7 +14,7 @@ describe("WebWorker Router", () => {
|
|||||||
|
|
||||||
let contentSelector = "app main h1";
|
let contentSelector = "app main h1";
|
||||||
let navSelector = "app nav ul";
|
let navSelector = "app nav ul";
|
||||||
var baseUrl = "playground/src/web_workers/router/index.html";
|
var baseUrl = 'all/playground/src/web_workers/router/index.html';
|
||||||
|
|
||||||
it("should route on click", () => {
|
it("should route on click", () => {
|
||||||
browser.get(baseUrl);
|
browser.get(baseUrl);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('WebWorkers Todo', function() {
|
describe('WebWorkers Todo', function() {
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@ -6,7 +6,7 @@ describe('WebWorkers Todo', function() {
|
|||||||
browser.ignoreSynchronization = false;
|
browser.ignoreSynchronization = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
var URL = "playground/src/web_workers/todo/index.html";
|
var URL = 'all/playground/src/web_workers/todo/index.html';
|
||||||
|
|
||||||
it('should bootstrap', () => {
|
it('should bootstrap', () => {
|
||||||
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
|
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util';
|
import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';
|
||||||
|
|
||||||
describe('Zippy Component', function() {
|
describe('Zippy Component', function() {
|
||||||
|
|
||||||
afterEach(verifyNoBrowserErrors);
|
afterEach(verifyNoBrowserErrors);
|
||||||
|
|
||||||
describe('zippy', function() {
|
describe('zippy', function() {
|
||||||
var URL = 'playground/src/zippy_component/index.html';
|
var URL = 'all/playground/src/zippy_component/index.html';
|
||||||
|
|
||||||
beforeEach(function() { browser.get(URL); });
|
beforeEach(function() { browser.get(URL); });
|
||||||
|
|
||||||
|
BIN
modules/playground/favicon.ico
Normal file
BIN
modules/playground/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
@ -1,4 +1,4 @@
|
|||||||
import {Component, Injectable} from 'angular2/core';
|
import {Component, Injectable} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
Routes,
|
Routes,
|
||||||
Route,
|
Route,
|
||||||
@ -11,10 +11,10 @@ import {
|
|||||||
UrlTree
|
UrlTree
|
||||||
} from 'angular2/alt_router';
|
} from 'angular2/alt_router';
|
||||||
import * as db from './data';
|
import * as db from './data';
|
||||||
import {Location} from 'angular2/platform/common';
|
import {Location} from '@angular/common';
|
||||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
import {PromiseWrapper} from '@angular/core/src/facade/async';
|
||||||
import {isPresent, DateWrapper} from 'angular2/src/facade/lang';
|
import {isPresent, DateWrapper} from '@angular/core/src/facade/lang';
|
||||||
import {PromiseCompleter} from 'angular2/src/facade/promise';
|
import {PromiseCompleter} from '@angular/core/src/facade/promise';
|
||||||
|
|
||||||
class InboxRecord {
|
class InboxRecord {
|
||||||
id: string = '';
|
id: string = '';
|
||||||
@ -93,7 +93,7 @@ class DbService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component(
|
@Component(
|
||||||
{selector: 'inbox-detail', directives: ROUTER_DIRECTIVES, templateUrl: 'inbox-detail.html'})
|
{selector: 'inbox-detail', directives: ROUTER_DIRECTIVES, templateUrl: 'app/inbox-detail.html'})
|
||||||
class InboxDetailCmp implements OnActivate {
|
class InboxDetailCmp implements OnActivate {
|
||||||
record: InboxRecord = new InboxRecord();
|
record: InboxRecord = new InboxRecord();
|
||||||
ready: boolean = false;
|
ready: boolean = false;
|
||||||
@ -107,7 +107,7 @@ class InboxDetailCmp implements OnActivate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'inbox', templateUrl: 'inbox.html', directives: ROUTER_DIRECTIVES})
|
@Component({selector: 'inbox', templateUrl: 'app/inbox.html', directives: ROUTER_DIRECTIVES})
|
||||||
class InboxCmp implements OnActivate {
|
class InboxCmp implements OnActivate {
|
||||||
items: InboxRecord[] = [];
|
items: InboxRecord[] = [];
|
||||||
ready: boolean = false;
|
ready: boolean = false;
|
||||||
@ -135,7 +135,7 @@ class InboxCmp implements OnActivate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({selector: 'drafts', templateUrl: 'drafts.html', directives: ROUTER_DIRECTIVES})
|
@Component({selector: 'drafts', templateUrl: 'app/drafts.html', directives: ROUTER_DIRECTIVES})
|
||||||
class DraftsCmp {
|
class DraftsCmp {
|
||||||
items: InboxRecord[] = [];
|
items: InboxRecord[] = [];
|
||||||
ready: boolean = false;
|
ready: boolean = false;
|
||||||
@ -151,7 +151,7 @@ class DraftsCmp {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'inbox-app',
|
selector: 'inbox-app',
|
||||||
providers: [DbService, ROUTER_PROVIDERS],
|
providers: [DbService, ROUTER_PROVIDERS],
|
||||||
templateUrl: 'inbox-app.html',
|
templateUrl: 'app/inbox-app.html',
|
||||||
directives: ROUTER_DIRECTIVES,
|
directives: ROUTER_DIRECTIVES,
|
||||||
})
|
})
|
||||||
@Routes([
|
@Routes([
|
@ -3,12 +3,12 @@
|
|||||||
<title>Routing Example</title>
|
<title>Routing Example</title>
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gumby/2.6.0/css/gumby.css" />
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gumby/2.6.0/css/gumby.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
||||||
<base href="/playground/src/alt_routing/">
|
<base href="/all/playground/src/alt_routing/">
|
||||||
<body>
|
<body>
|
||||||
<inbox-app>
|
<inbox-app>
|
||||||
Loading...
|
Loading...
|
||||||
</inbox-app>
|
</inbox-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {InboxApp} from './inbox-app';
|
import {InboxApp} from './app/inbox-app';
|
||||||
import {provide} from 'angular2/core';
|
import {provide} from '@angular/core';
|
||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {HashLocationStrategy, LocationStrategy} from 'angular2/platform/common';
|
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
||||||
import {ROUTER_PROVIDERS} from 'angular2/router';
|
import {ROUTER_PROVIDERS} from '@angular/router';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
bootstrap(InboxApp,
|
bootstrap(InboxApp,
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
||||||
<body>
|
<body>
|
||||||
<animate-app>Loading...</animate-app>
|
<animate-app>Loading...</animate-app>
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {AnimateApp} from './animate-app';
|
import {AnimateApp} from './app/animate-app';
|
||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
bootstrap(AnimateApp);
|
bootstrap(AnimateApp);
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</async-app>
|
</async-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {NgIf} from '@angular/common';
|
import {NgIf} from '@angular/common';
|
||||||
import {TimerWrapper} from '@angular/facade';
|
import {TimerWrapper} from '@angular/core/src/facade/async';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'async-app',
|
selector: 'async-app',
|
||||||
|
95
modules/playground/src/bootstrap.ts
Normal file
95
modules/playground/src/bootstrap.ts
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
declare var System: any;
|
||||||
|
|
||||||
|
|
||||||
|
(function(global) {
|
||||||
|
|
||||||
|
writeScriptTag('/all/playground/vendor/es6-shim.js');
|
||||||
|
writeScriptTag('/all/playground/vendor/zone.js');
|
||||||
|
writeScriptTag('/all/playground/vendor/long-stack-trace-zone.js');
|
||||||
|
writeScriptTag('/all/playground/vendor/system.src.js');
|
||||||
|
writeScriptTag('/all/playground/vendor/Reflect.js');
|
||||||
|
writeScriptTag('/all/playground/vendor/Rx.js', 'playgroundBootstrap()');
|
||||||
|
global.playgroundBootstrap = playgroundBootstrap;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////
|
||||||
|
function playgroundBootstrap() {
|
||||||
|
// check query param
|
||||||
|
var useBundles = location.search.indexOf('bundles=false') == -1;
|
||||||
|
if (useBundles) {
|
||||||
|
System.config({
|
||||||
|
map: {
|
||||||
|
'index': 'index.js',
|
||||||
|
'@angular/core': '/packages-dist/core/core.umd.js',
|
||||||
|
'@angular/common': '/packages-dist/common/common.umd.js',
|
||||||
|
'@angular/compiler': '/packages-dist/compiler/compiler.umd.js',
|
||||||
|
'@angular/platform-browser': '/packages-dist/platform-browser/platform-browser.umd.js',
|
||||||
|
'@angular/platform-browser-dynamic': '/packages-dist/platform-browser-dynamic/platform-browser-dynamic.umd.js',
|
||||||
|
'@angular/http': '/packages-dist/http/http.umd.js',
|
||||||
|
'@angular/upgrade': '/packages-dist/upgrade/upgrade.umd.js',
|
||||||
|
'@angular/router': '/packages-dist/router/router.umd.js',
|
||||||
|
'@angular/core/src/facade': '/all/@angular/core/src/facade',
|
||||||
|
'rxjs': location.pathname.replace(/index\.html$/, '') + 'rxjs'
|
||||||
|
},
|
||||||
|
packages: {
|
||||||
|
'app': {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'@angular/core/src/facade': {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.warn("Not using the Angular bundles. Don't use this configuration for e2e/performance tests!");
|
||||||
|
|
||||||
|
System.config({
|
||||||
|
map: {
|
||||||
|
'index': 'index.js',
|
||||||
|
'@angular': '/all/@angular'
|
||||||
|
},
|
||||||
|
packages: {
|
||||||
|
// 'app': {
|
||||||
|
// main: 'index.js',
|
||||||
|
// defaultExtension: 'js'
|
||||||
|
// },
|
||||||
|
'@angular/core': {
|
||||||
|
main: 'index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'@angular/compiler': {
|
||||||
|
main: 'index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'@angular/common': {
|
||||||
|
main: 'index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'@angular/platform-browser': {
|
||||||
|
main: 'index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
'@angular/platform-browser-dynamic': {
|
||||||
|
main: 'index.js',
|
||||||
|
defaultExtension: 'js'
|
||||||
|
}
|
||||||
|
// 'rxjs': {
|
||||||
|
// defaultExtension: 'js'
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// BOOTSTRAP the app!
|
||||||
|
System.import('index').then(function (m) {
|
||||||
|
m.main();
|
||||||
|
}, console.error.bind(console));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function writeScriptTag(scriptUrl, onload?) {
|
||||||
|
document.write(`<script src="${scriptUrl}" onload="${onload}"></script>`);
|
||||||
|
}
|
||||||
|
}(window));
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({selector: 'gestures-app', templateUrl: 'template.html'})
|
@Component({selector: 'gestures-app', templateUrl: 'template.html'})
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<title>Routing Example</title>
|
<title>Routing Example</title>
|
||||||
<base href="/playground/src/hash_routing/">
|
<base href="/all/playground/src/hash_routing/">
|
||||||
<body>
|
<body>
|
||||||
<example-app>
|
<example-app>
|
||||||
Loading...
|
Loading...
|
||||||
</example-app>
|
</example-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Component, provide} from '@angular/core';
|
import {Component, provide} from '@angular/core';
|
||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {RouteConfig, Route, ROUTER_PROVIDERS, ROUTER_DIRECTIVES} from '@angular/router';
|
import {RouteConfig, Route, ROUTER_PROVIDERS, ROUTER_DIRECTIVES} from '@angular/router';
|
||||||
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<title>Hello Angular 2.0</title>
|
<title>Hello Angular 2.0</title>
|
||||||
<body>
|
<body>
|
||||||
<hello-app>
|
<hello-app>
|
||||||
Loading...
|
Loading...
|
||||||
</hello-app>
|
</hello-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core';
|
import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {Http, Response} from '@angular/http/http';
|
import {Http, Response} from '@angular/http';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
@ -6,6 +6,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</http-app>
|
</http-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {HTTP_PROVIDERS} from '@angular/http/http';
|
import {HTTP_PROVIDERS} from '@angular/http';
|
||||||
import {HttpCmp} from './http_comp';
|
import {HttpCmp} from './app/http_comp';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
bootstrap(HttpCmp, [HTTP_PROVIDERS]);
|
bootstrap(HttpCmp, [HTTP_PROVIDERS]);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {Jsonp, Response} from '@angular/http/http';
|
import {Jsonp} from '@angular/http';
|
||||||
import {ObservableWrapper} from '@angular/facade';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'jsonp-app',
|
selector: 'jsonp-app',
|
@ -6,6 +6,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</jsonp-app>
|
</jsonp-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {JSONP_PROVIDERS} from '@angular/http/http';
|
import {JSONP_PROVIDERS} from '@angular/http';
|
||||||
import {JsonpCmp} from './jsonp_comp';
|
import {JsonpCmp} from './app/jsonp_comp';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
bootstrap(JsonpCmp, [JSONP_PROVIDERS]);
|
bootstrap(JsonpCmp, [JSONP_PROVIDERS]);
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</key-events-app>
|
</key-events-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {KeyEventsPlugin} from '@angular/platform-browser/src/dom/events/key_events';
|
import {KeyEventsPlugin} from '@angular/platform-browser/src/dom/events/key_events';
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</model-driven-forms>
|
</model-driven-forms>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {
|
import {
|
||||||
FORM_DIRECTIVES,
|
FORM_DIRECTIVES,
|
||||||
ControlGroup,
|
ControlGroup,
|
||||||
NgControl,
|
|
||||||
Validators,
|
Validators,
|
||||||
NgFormModel,
|
NgFormModel,
|
||||||
FormBuilder,
|
FormBuilder,
|
||||||
@ -11,7 +10,7 @@ import {
|
|||||||
} from '@angular/common';
|
} from '@angular/common';
|
||||||
import {Component, Directive, Host} from '@angular/core';
|
import {Component, Directive, Host} from '@angular/core';
|
||||||
|
|
||||||
import {RegExpWrapper, print, isPresent} from '@angular/facade';
|
import {RegExpWrapper, print, isPresent} from '@angular/core/src/facade/lang';
|
||||||
import {AbstractControl} from '@angular/common';
|
import {AbstractControl} from '@angular/common';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</order-management-app>
|
</order-management-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
Directive,
|
Directive,
|
||||||
@ -12,7 +12,7 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {NgIf, NgFor, FORM_DIRECTIVES} from '@angular/common';
|
import {NgIf, NgFor, FORM_DIRECTIVES} from '@angular/common';
|
||||||
|
|
||||||
import {ListWrapper} from '@angular/facade';
|
import {ListWrapper} from '@angular/core/src/facade/collection';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You can find the Angular 1 implementation of this example here:
|
* You can find the Angular 1 implementation of this example here:
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</person-management-app>
|
</person-management-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</relative-app>
|
</relative-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core';
|
import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core';
|
||||||
import {MyCmp} from './my_cmp/my_cmp';
|
import {MyCmp} from './app/my_cmp';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
bootstrap(RelativeApp);
|
bootstrap(RelativeApp);
|
||||||
|
@ -2,9 +2,8 @@ import {Component, Injectable} from '@angular/core';
|
|||||||
import {RouterLink, RouteConfig, Router, Route, RouterOutlet, RouteParams} from '@angular/router';
|
import {RouterLink, RouteConfig, Router, Route, RouterOutlet, RouteParams} from '@angular/router';
|
||||||
import * as db from './data';
|
import * as db from './data';
|
||||||
import {Location} from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
import {PromiseWrapper} from '@angular/facade';
|
import {PromiseWrapper, PromiseCompleter} from '@angular/core/src/facade/async';
|
||||||
import {isPresent, DateWrapper} from '@angular/facade';
|
import {isPresent, DateWrapper} from '@angular/core/src/facade/lang';
|
||||||
import {PromiseCompleter} from '@angular/facade';
|
|
||||||
|
|
||||||
class InboxRecord {
|
class InboxRecord {
|
||||||
id: string = '';
|
id: string = '';
|
||||||
@ -82,7 +81,7 @@ class DbService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'inbox-detail.html'})
|
@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'app/inbox-detail.html'})
|
||||||
class InboxDetailCmp {
|
class InboxDetailCmp {
|
||||||
record: InboxRecord = new InboxRecord();
|
record: InboxRecord = new InboxRecord();
|
||||||
ready: boolean = false;
|
ready: boolean = false;
|
||||||
@ -93,7 +92,7 @@ class InboxDetailCmp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({selector: 'inbox', templateUrl: 'inbox.html', directives: [RouterLink]})
|
@Component({selector: 'inbox', templateUrl: 'app/inbox.html', directives: [RouterLink]})
|
||||||
class InboxCmp {
|
class InboxCmp {
|
||||||
items: InboxRecord[] = [];
|
items: InboxRecord[] = [];
|
||||||
ready: boolean = false;
|
ready: boolean = false;
|
||||||
@ -118,7 +117,7 @@ class InboxCmp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({selector: 'drafts', templateUrl: 'drafts.html', directives: [RouterLink]})
|
@Component({selector: 'drafts', templateUrl: 'app/drafts.html', directives: [RouterLink]})
|
||||||
class DraftsCmp {
|
class DraftsCmp {
|
||||||
items: InboxRecord[] = [];
|
items: InboxRecord[] = [];
|
||||||
ready: boolean = false;
|
ready: boolean = false;
|
||||||
@ -134,7 +133,7 @@ class DraftsCmp {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'inbox-app',
|
selector: 'inbox-app',
|
||||||
viewProviders: [DbService],
|
viewProviders: [DbService],
|
||||||
templateUrl: 'inbox-app.html',
|
templateUrl: 'app/inbox-app.html',
|
||||||
directives: [RouterOutlet, RouterLink]
|
directives: [RouterOutlet, RouterLink]
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
@RouteConfig([
|
@ -3,12 +3,12 @@
|
|||||||
<title>Routing Example</title>
|
<title>Routing Example</title>
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gumby/2.6.0/css/gumby.css" />
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gumby/2.6.0/css/gumby.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
<link rel="stylesheet" type="text/css" href="./css/app.css" />
|
||||||
<base href="/playground/src/routing/">
|
<base href="/all/playground/src/routing/">
|
||||||
<body>
|
<body>
|
||||||
<inbox-app>
|
<inbox-app>
|
||||||
Loading...
|
Loading...
|
||||||
</inbox-app>
|
</inbox-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {InboxApp} from './inbox-app';
|
import {InboxApp} from './app/inbox-app';
|
||||||
import {provide} from '@angular/core';
|
import {provide} from '@angular/core';
|
||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
|
||||||
import {ROUTER_PROVIDERS} from '@angular/router';
|
import {ROUTER_PROVIDERS} from '@angular/router';
|
||||||
|
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
via source maps!
|
via source maps!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {BaseException, WrappedException} from '@angular/facade';
|
import {BaseException} from '@angular/core/src/facade/exceptions';
|
||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
<svg-app>
|
<svg-app>
|
||||||
Loading...
|
Loading...
|
||||||
</svg-app>
|
</svg-app>
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({selector: '[svg-group]', template: `<svg:text x="20" y="20">Hello</svg:text>`})
|
@Component({selector: '[svg-group]', template: `<svg:text x="20" y="20">Hello</svg:text>`})
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</template-driven-forms>
|
</template-driven-forms>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component, Directive, Host, forwardRef, Provider} from '@angular/core';
|
import {Component, Directive, Host} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
ControlGroup,
|
ControlGroup,
|
||||||
NgIf,
|
NgIf,
|
||||||
@ -11,7 +11,7 @@ import {
|
|||||||
NgForm
|
NgForm
|
||||||
} from '@angular/common';
|
} from '@angular/common';
|
||||||
|
|
||||||
import {RegExpWrapper, print, isPresent} from '@angular/facade';
|
import {RegExpWrapper, print, isPresent} from '@angular/core/src/facade/lang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A domain model we are binding the form controls to.
|
* A domain model we are binding the form controls to.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ListWrapper, Predicate} from '@angular/facade';
|
import {ListWrapper, Predicate} from '@angular/core/src/facade/collection';
|
||||||
|
|
||||||
// base model for RecordStore
|
// base model for RecordStore
|
||||||
export abstract class KeyModel {
|
export abstract class KeyModel {
|
@ -1,13 +1,14 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<base>
|
||||||
<title>Todo Angular 2</title>
|
<title>Todo Angular 2</title>
|
||||||
<link rel="stylesheet" href="css/main.css" media="screen" title="no title" charset="utf-8">
|
<link rel="stylesheet" href="css/main.css" media="screen" title="no title" charset="utf-8">
|
||||||
|
<base href="./">
|
||||||
<body>
|
<body>
|
||||||
<todo-app>
|
<todo-app>
|
||||||
Loading...
|
Loading...
|
||||||
</todo-app>
|
</todo-app>
|
||||||
|
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {NgFor} from '@angular/common';
|
import {NgFor} from '@angular/common';
|
||||||
import {Store, Todo, TodoFactory} from './services/TodoStore';
|
import {Store, Todo, TodoFactory} from './app/TodoStore';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'todo-app',
|
selector: 'todo-app',
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<span class="greeting">Greetings from {{name}}!</span>
|
<span class="greeting">Greetings from {{name}}!</span>
|
||||||
</upgrade-app>
|
</upgrade-app>
|
||||||
<script src="/benchmarks_external/src/angular.js"></script>
|
<script src="/all/playground/vendor/angular.js"></script>
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<image-demo>
|
<image-demo>
|
||||||
</image-demo>
|
</image-demo>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../../bootstrap.js"></script>
|
||||||
<!-- Compiled and minified CSS -->
|
<!-- Compiled and minified CSS -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import {EventListener} from '@angular/core/src/facade/browser';
|
||||||
|
import {TimerWrapper} from '@angular/core/src/facade/async';
|
||||||
import {BitmapService} from './services/bitmap';
|
import {BitmapService} from './services/bitmap';
|
||||||
import {EventListener} from '@angular/facade';
|
|
||||||
import {FileReader, Uint8ArrayWrapper} from './file_api';
|
import {FileReader, Uint8ArrayWrapper} from './file_api';
|
||||||
import {TimerWrapper} from '@angular/facade';
|
|
||||||
|
|
||||||
@Component({selector: 'image-demo', viewProviders: [BitmapService], templateUrl: 'image_demo.html'})
|
@Component({selector: 'image-demo', viewProviders: [BitmapService], templateUrl: 'image_demo.html'})
|
||||||
export class ImageDemo {
|
export class ImageDemo {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<image-demo>
|
<image-demo>
|
||||||
</image-demo>
|
</image-demo>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
<!-- Compiled and minified CSS -->
|
<!-- Compiled and minified CSS -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {ImageDemo} from './index_common';
|
import {ImageDemo} from './index_common';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</input-app>
|
</input-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</hello-app>
|
</hello-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core';
|
import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core';
|
||||||
import {StringWrapper} from '@angular/facade';
|
import {StringWrapper} from '@angular/core/src/facade/lang';
|
||||||
|
|
||||||
// A service available to the Injector, used by the HelloCmp component.
|
// A service available to the Injector, used by the HelloCmp component.
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
<button type="button" id="send_echo">Send Echo</button>
|
<button type="button" id="send_echo">Send Echo</button>
|
||||||
<p id="echo_result"></p>
|
<p id="echo_result"></p>
|
||||||
<p id="ui_result"></p>
|
<p id="ui_result"></p>
|
||||||
$SCRIPTS$
|
<script src="../../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {PromiseWrapper} from '@angular/facade';
|
import {PromiseWrapper} from '@angular/core/src/facade/async';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
ServiceMessageBrokerFactory,
|
ServiceMessageBrokerFactory,
|
||||||
PRIMITIVE
|
PRIMITIVE
|
||||||
} from '../../../../@angular/platform-browser/src/worker_app';
|
} from '@angular/platform-browser/src/worker_app';;
|
||||||
|
|
||||||
const ECHO_CHANNEL = "ECHO";
|
const ECHO_CHANNEL = "ECHO";
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
<title>Web Worker Router Example</title>
|
<title>Web Worker Router Example</title>
|
||||||
<body>
|
<body>
|
||||||
<app></app>
|
<app></app>
|
||||||
$SCRIPTS$
|
<script src="../../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
</todo-app>
|
</todo-app>
|
||||||
|
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
</todo-app>
|
</todo-app>
|
||||||
|
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ListWrapper, Predicate} from '@angular/facade';
|
import {ListWrapper, Predicate} from '@angular/core/src/facade/collection';
|
||||||
|
|
||||||
// base model for RecordStore
|
// base model for RecordStore
|
||||||
export class KeyModel {
|
export class KeyModel {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||||
import {ObservableWrapper} from '@angular/facade';
|
import {ObservableWrapper} from '@angular/core/src/facade/async';
|
||||||
|
|
||||||
@Component({selector: 'zippy', templateUrl: 'zippy.html'})
|
@Component({selector: 'zippy', templateUrl: 'app/zippy.html'})
|
||||||
export class Zippy {
|
export class Zippy {
|
||||||
visible: boolean = true;
|
visible: boolean = true;
|
||||||
@Input() title: string = '';
|
@Input() title: string = '';
|
@ -6,6 +6,6 @@
|
|||||||
Loading...
|
Loading...
|
||||||
</zippy-app>
|
</zippy-app>
|
||||||
|
|
||||||
$SCRIPTS$
|
<script src="../bootstrap.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {bootstrap} from '@angular/platform-browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {Zippy} from './zippy';
|
import {Zippy} from './app/zippy';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'zippy-app',
|
selector: 'zippy-app',
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
"benchmarks_external",
|
"benchmarks_external",
|
||||||
"benchpress",
|
"benchpress",
|
||||||
"payload_tests",
|
"payload_tests",
|
||||||
"playground",
|
|
||||||
"rollup-test",
|
"rollup-test",
|
||||||
"upgrade-ts2dart.d.ts",
|
"upgrade-ts2dart.d.ts",
|
||||||
"zone-ts2dart.d.ts"
|
"zone-ts2dart.d.ts"
|
||||||
|
39
protractor-js-new-world.conf.js
Normal file
39
protractor-js-new-world.conf.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
var BROWSER_OPTIONS = {
|
||||||
|
LocalChrome: {
|
||||||
|
'browserName': 'chrome'
|
||||||
|
},
|
||||||
|
ChromeOnTravis: {
|
||||||
|
browserName: 'chrome',
|
||||||
|
chromeOptions: {
|
||||||
|
'args': ['--no-sandbox'],
|
||||||
|
'binary': process.env.CHROME_BIN
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
exports.config = {
|
||||||
|
allScriptsTimeout: 11000,
|
||||||
|
specs: [
|
||||||
|
'dist/all/**/e2e_test/**/*_spec.js'
|
||||||
|
],
|
||||||
|
exclude: [
|
||||||
|
'**/alt_routing/**', // temporary package
|
||||||
|
'**/web_workers/**', // needs to be setup
|
||||||
|
'**/key_events/**', // can't tell why this is failing
|
||||||
|
'**/sourcemap/**' // fails only on travis
|
||||||
|
],
|
||||||
|
capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome,
|
||||||
|
directConnect: true,
|
||||||
|
baseUrl: 'http://localhost:7777/',
|
||||||
|
framework: 'jasmine2',
|
||||||
|
jasmineNodeOpts: {
|
||||||
|
showColors: true,
|
||||||
|
defaultTimeoutInterval: 60000,
|
||||||
|
print: function(msg) { console.log(msg)}
|
||||||
|
},
|
||||||
|
useAllAngular2AppRoots: true
|
||||||
|
};
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@ var data = module.exports = require('./protractor-shared.js');
|
|||||||
var config = data.config;
|
var config = data.config;
|
||||||
|
|
||||||
config.baseUrl = 'http://localhost:8001/';
|
config.baseUrl = 'http://localhost:8001/';
|
||||||
// TODO: remove exclusion when JS verison of scrolling benchmark is available
|
// TODO: remove exclusion when JS version of scrolling benchmark is available
|
||||||
config.exclude.push('dist/js/cjs/benchmarks_external/e2e_test/naive_infinite_scroll_spec.js');
|
config.exclude.push('dist/js/cjs/benchmarks_external/e2e_test/naive_infinite_scroll_spec.js');
|
||||||
config.exclude.push('dist/js/cjs/benchmarks_external/e2e_test/naive_infinite_scroll_perf.js');
|
config.exclude.push('dist/js/cjs/benchmarks_external/e2e_test/naive_infinite_scroll_perf.js');
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user