fix(router): export ROUTER_LINK_DSL_PROVIDER and hide MockPopStateEvent

This commit is contained in:
Igor Minar 2015-12-15 09:42:27 -08:00
parent 00822c3415
commit fc75220d63
2 changed files with 4 additions and 4 deletions

View File

@ -31,5 +31,5 @@ export {RouterLinkTransform} from 'angular2/src/router/router_link_transform';
* <a [routerLink]="User[Modal]"> <!-- Same as <a [routerLink]="['User', ['Modal']]"> --> * <a [routerLink]="User[Modal]"> <!-- Same as <a [routerLink]="['User', ['Modal']]"> -->
* ``` * ```
*/ */
const ROUTER_LINK_DSL_PROVIDER = export const ROUTER_LINK_DSL_PROVIDER =
CONST_EXPR(new Provider(TEMPLATE_TRANSFORMS, {useClass: RouterLinkTransform, multi: true})); CONST_EXPR(new Provider(TEMPLATE_TRANSFORMS, {useClass: RouterLinkTransform, multi: true}));

View File

@ -19,7 +19,7 @@ export class MockLocationStrategy extends LocationStrategy {
simulatePopState(url: string): void { simulatePopState(url: string): void {
this.internalPath = url; this.internalPath = url;
ObservableWrapper.callEmit(this._subject, new MockPopStateEvent(this.path())); ObservableWrapper.callEmit(this._subject, new _MockPopStateEvent(this.path()));
} }
path(): string { return this.internalPath; } path(): string { return this.internalPath; }
@ -66,7 +66,7 @@ export class MockLocationStrategy extends LocationStrategy {
forward(): void { throw 'not implemented'; } forward(): void { throw 'not implemented'; }
} }
class MockPopStateEvent { class _MockPopStateEvent {
pop: boolean = true; pop: boolean = true;
type: string = 'popstate'; type: string = 'popstate';
constructor(public newUrl: string) {} constructor(public newUrl: string) {}