repackaging: all the repackaging changes squashed
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {CanActivate, RouteConfig, ComponentInstruction, ROUTER_DIRECTIVES} from 'angular2/router';
|
||||
import {APP_BASE_HREF} from 'angular2/platform/common';
|
||||
import {provide, Component, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {CanActivate, RouteConfig, ComponentInstruction, ROUTER_DIRECTIVES} from '@angular/router';
|
||||
import {APP_BASE_HREF} from '@angular/common';
|
||||
|
||||
function checkIfWeHavePermission(instruction: ComponentInstruction) {
|
||||
return instruction.params['id'] == '1';
|
||||
@ -42,11 +42,11 @@ class HomeCmp {
|
||||
{path: '/user-settings/:id', component: ControlPanelCmp, name: 'ControlPanelCmp'},
|
||||
{path: '/', component: HomeCmp, name: 'HomeCmp'}
|
||||
])
|
||||
class AppCmp {
|
||||
export class AppCmp {
|
||||
}
|
||||
|
||||
|
||||
export function main() {
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/can_activate'})]);
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/can_activate'})]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
|
||||
import {expect} from 'angular2/testing';
|
||||
import {verifyNoBrowserErrors, browser} from '@angular/platform-browser/testing_e2e';
|
||||
import {expect} from '@angular/core/testing';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
var EC = (<any>protractor).ExpectedConditions;
|
||||
@ -11,7 +11,7 @@ describe('reuse example app', function() {
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
var URL = 'angular2/examples/router/ts/can_activate/';
|
||||
var URL = '@angular/examples/router/ts/can_activate/';
|
||||
|
||||
it('should navigate to user 1', function() {
|
||||
browser.get(URL);
|
||||
|
@ -4,7 +4,6 @@
|
||||
<title>Routing canActivate Lifecycle Example</title>
|
||||
<base href="/">
|
||||
|
||||
<script src="http://cdn.rawgit.com/google/traceur-compiler/90da568c7aa8e53ea362db1fc211fbb4f65b5e94/bin/traceur-runtime.js"></script>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/systemjs/0.18.4/system.js"></script>
|
||||
<script>System.config({ baseURL: '/', defaultJSExtensions: true});</script>
|
||||
<script src="/bundle/angular2.dev.js"></script>
|
||||
@ -15,7 +14,7 @@
|
||||
Loading...
|
||||
</example-app>
|
||||
<script>
|
||||
var filename = 'angular2/examples/router/ts/can_activate/can_activate_example';
|
||||
var filename = '@angular/examples/router/ts/can_activate/can_activate_example';
|
||||
System.import(filename).then(function(m) {
|
||||
m.main();
|
||||
}, console.error.bind(console));
|
||||
|
@ -1,13 +1,13 @@
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {provide, Component, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {
|
||||
CanDeactivate,
|
||||
RouteConfig,
|
||||
RouteParams,
|
||||
ComponentInstruction,
|
||||
ROUTER_DIRECTIVES
|
||||
} from 'angular2/router';
|
||||
import {APP_BASE_HREF} from 'angular2/platform/common';
|
||||
} from '@angular/router';
|
||||
import {APP_BASE_HREF} from '@angular/common';
|
||||
|
||||
// #docregion routerCanDeactivate
|
||||
@Component({
|
||||
@ -57,11 +57,11 @@ class NoteIndexCmp {
|
||||
{path: '/note/:id', component: NoteCmp, name: 'NoteCmp'},
|
||||
{path: '/', component: NoteIndexCmp, name: 'NoteIndexCmp'}
|
||||
])
|
||||
class AppCmp {
|
||||
export class AppCmp {
|
||||
}
|
||||
|
||||
|
||||
export function main() {
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/can_deactivate'})]);
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/can_deactivate'})]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
|
||||
import {expect} from 'angular2/testing';
|
||||
import {verifyNoBrowserErrors, browser} from '@angular/platform-browser/testing_e2e';
|
||||
import {expect} from '@angular/core/testing';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
var EC = (<any>protractor).ExpectedConditions;
|
||||
@ -16,7 +16,7 @@ describe('can deactivate example app', function() {
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
var URL = 'angular2/examples/router/ts/can_deactivate/';
|
||||
var URL = '@angular/examples/router/ts/can_deactivate/';
|
||||
|
||||
it('should not navigate away when prompt is cancelled', function() {
|
||||
browser.get(URL);
|
||||
|
@ -15,7 +15,7 @@
|
||||
Loading...
|
||||
</example-app>
|
||||
<script>
|
||||
var filename = 'angular2/examples/router/ts/can_deactivate/can_deactivate_example';
|
||||
var filename = '@angular/examples/router/ts/can_deactivate/can_deactivate_example';
|
||||
System.import(filename).then(function(m) {
|
||||
m.main();
|
||||
}, console.error.bind(console));
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {OnActivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
|
||||
import {APP_BASE_HREF} from 'angular2/platform/common';
|
||||
import {Component, provide, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {OnActivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES} from '@angular/router';
|
||||
import {APP_BASE_HREF} from '@angular/common';
|
||||
|
||||
// #docregion routerOnActivate
|
||||
@Component({template: `Child`})
|
||||
@ -46,7 +46,7 @@ class ParentCmp implements OnActivate {
|
||||
export class AppCmp {
|
||||
}
|
||||
|
||||
export function main() {
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_activate'})]);
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/on_activate'})]);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
Loading...
|
||||
</example-app>
|
||||
<script>
|
||||
var filename = 'angular2/examples/router/ts/on_deactivate/on_deactivate_example';
|
||||
var filename = '@angular/examples/router/ts/on_deactivate/on_deactivate_example';
|
||||
System.import(filename).then(function(m) {
|
||||
m.main();
|
||||
}, console.error.bind(console));
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {Component, Injectable, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {OnDeactivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
|
||||
import {APP_BASE_HREF} from 'angular2/platform/common';
|
||||
import {Component, Injectable, provide, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {OnDeactivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES} from '@angular/router';
|
||||
import {APP_BASE_HREF} from '@angular/common';
|
||||
|
||||
|
||||
@Injectable()
|
||||
class LogService {
|
||||
export class LogService {
|
||||
logs: string[] = [];
|
||||
|
||||
addLog(message: string): void { this.logs.push(message); }
|
||||
@ -45,14 +45,14 @@ class MyCmp implements OnDeactivate {
|
||||
{path: '/', component: MyCmp, name: 'HomeCmp'},
|
||||
{path: '/:param', component: MyCmp, name: 'ParamCmp'}
|
||||
])
|
||||
class AppCmp {
|
||||
export class AppCmp {
|
||||
constructor(public logService: LogService) {}
|
||||
}
|
||||
|
||||
|
||||
export function main() {
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(AppCmp, [
|
||||
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}),
|
||||
provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/on_deactivate'}),
|
||||
LogService
|
||||
]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
|
||||
import {expect} from 'angular2/testing';
|
||||
import {verifyNoBrowserErrors, browser} from '@angular/platform-browser/testing_e2e';
|
||||
import {expect} from '@angular/core/testing';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
var EC = (<any>protractor).ExpectedConditions;
|
||||
@ -10,7 +10,7 @@ function waitForElement(selector: string) {
|
||||
describe('on activate example app', function() {
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
var URL = 'angular2/examples/router/ts/on_deactivate/';
|
||||
var URL = '@angular/examples/router/ts/on_deactivate/';
|
||||
|
||||
it('should update the text when navigating between routes', function() {
|
||||
browser.get(URL);
|
||||
@ -27,6 +27,6 @@ describe('on activate example app', function() {
|
||||
waitForElement('my-cmp');
|
||||
|
||||
expect(element(by.css('#log')).getText())
|
||||
.toEqual('Log:\nNavigating from "" to "1"\nNavigating from "1" to ""');
|
||||
.toEqual('Log:\nNavigating from "" to "1"\nNavigating from "./1" to ""');
|
||||
});
|
||||
});
|
||||
|
@ -15,7 +15,7 @@
|
||||
Loading...
|
||||
</example-app>
|
||||
<script>
|
||||
var filename = 'angular2/examples/router/ts/reuse/reuse_example';
|
||||
var filename = '@angular/examples/router/ts/reuse/reuse_example';
|
||||
System.import(filename).then(function(m) {
|
||||
m.main();
|
||||
}, console.error.bind(console));
|
||||
|
@ -1,15 +1,14 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {Component, provide, ComponentRef} from '@angular/core';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
ComponentInstruction,
|
||||
ROUTER_DIRECTIVES,
|
||||
CanReuse,
|
||||
RouteParams,
|
||||
OnReuse
|
||||
} from 'angular2/router';
|
||||
import {APP_BASE_HREF} from 'angular2/platform/common';
|
||||
} from '@angular/router';
|
||||
import {APP_BASE_HREF} from '@angular/common';
|
||||
|
||||
|
||||
// #docregion reuseCmp
|
||||
@ -48,11 +47,11 @@ class MyCmp implements CanReuse,
|
||||
{path: '/', component: MyCmp, name: 'HomeCmp'},
|
||||
{path: '/:name', component: MyCmp, name: 'HomeCmp'}
|
||||
])
|
||||
class AppCmp {
|
||||
export class AppCmp {
|
||||
}
|
||||
|
||||
|
||||
export function main() {
|
||||
export function main(): Promise<ComponentRef<AppCmp>> {
|
||||
return bootstrap(AppCmp,
|
||||
[provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
|
||||
[provide(APP_BASE_HREF, {useValue: '/@angular/examples/router/ts/reuse'})]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {verifyNoBrowserErrors, browser} from 'angular2/src/testing/e2e_util';
|
||||
import {expect} from 'angular2/testing';
|
||||
import {verifyNoBrowserErrors, browser} from '@angular/platform-browser/testing_e2e';
|
||||
import {expect} from '@angular/core/testing';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
var EC = (<any>protractor).ExpectedConditions;
|
||||
@ -11,7 +11,7 @@ describe('reuse example app', function() {
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
var URL = 'angular2/examples/router/ts/reuse/';
|
||||
var URL = '@angular/examples/router/ts/reuse/';
|
||||
|
||||
it('should build a link which points to the detail page', function() {
|
||||
browser.get(URL);
|
||||
|
Reference in New Issue
Block a user