refactor(common): rename UrlChangeEvent and UrlChangeListener to LocationChangeEvent and LocationChangeListener

These apis are not expected to be used anyone, hence I'm not documenting this change as a breaking.
This commit is contained in:
Igor Minar
2016-08-23 14:26:31 -07:00
committed by Victor Berchet
parent 8a2324f86a
commit 1f5a5895e5
9 changed files with 37 additions and 36 deletions

View File

@ -33,7 +33,7 @@ export declare class HashLocationStrategy extends LocationStrategy {
back(): void;
forward(): void;
getBaseHref(): string;
onPopState(fn: UrlChangeListener): void;
onPopState(fn: LocationChangeListener): void;
path(includeHash?: boolean): string;
prepareExternalUrl(internal: string): string;
pushState(state: any, title: string, path: string, queryParams: string): void;
@ -77,12 +77,22 @@ export declare class Location {
static stripTrailingSlash(url: string): string;
}
/** @experimental */
export interface LocationChangeEvent {
type: string;
}
/** @experimental */
export interface LocationChangeListener {
(e: LocationChangeEvent): any;
}
/** @stable */
export declare abstract class LocationStrategy {
abstract back(): void;
abstract forward(): void;
abstract getBaseHref(): string;
abstract onPopState(fn: UrlChangeListener): void;
abstract onPopState(fn: LocationChangeListener): void;
abstract path(includeHash?: boolean): string;
abstract prepareExternalUrl(internal: string): string;
abstract pushState(state: any, title: string, url: string, queryParams: string): void;
@ -177,7 +187,7 @@ export declare class PathLocationStrategy extends LocationStrategy {
back(): void;
forward(): void;
getBaseHref(): string;
onPopState(fn: UrlChangeListener): void;
onPopState(fn: LocationChangeListener): void;
path(includeHash?: boolean): string;
prepareExternalUrl(internal: string): string;
pushState(state: any, title: string, url: string, queryParams: string): void;
@ -197,8 +207,8 @@ export declare abstract class PlatformLocation {
abstract back(): void;
abstract forward(): void;
abstract getBaseHrefFromDOM(): string;
abstract onHashChange(fn: UrlChangeListener): void;
abstract onPopState(fn: UrlChangeListener): void;
abstract onHashChange(fn: LocationChangeListener): void;
abstract onPopState(fn: LocationChangeListener): void;
abstract pushState(state: any, title: string, url: string): void;
abstract replaceState(state: any, title: string, url: string): void;
}
@ -212,13 +222,3 @@ export declare class SlicePipe implements PipeTransform {
export declare class UpperCasePipe implements PipeTransform {
transform(value: string): string;
}
/** @experimental */
export interface UrlChangeEvent {
type: string;
}
/** @experimental */
export interface UrlChangeListener {
(e: UrlChangeEvent): any;
}

View File

@ -21,8 +21,8 @@ export declare class BrowserPlatformLocation extends PlatformLocation {
back(): void;
forward(): void;
getBaseHrefFromDOM(): string;
onHashChange(fn: UrlChangeListener): void;
onPopState(fn: UrlChangeListener): void;
onHashChange(fn: LocationChangeListener): void;
onPopState(fn: LocationChangeListener): void;
pushState(state: any, title: string, url: string): void;
replaceState(state: any, title: string, url: string): void;
}