File tree Expand file tree Collapse file tree
modules/@angular/common/src/location
tools/public_api_guard/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ import {EventEmitter, Injectable} from '@angular/core';
1010
1111import { LocationStrategy } from './location_strategy' ;
1212
13+ /** @experimental */
14+ export interface PopStateEvent {
15+ pop ?: boolean ;
16+ type ?: string ;
17+ url ?: string ;
18+ }
1319
1420/**
1521 * @whatItDoes `Location` is a service that applications can use to interact with a browser's URL.
@@ -122,7 +128,7 @@ export class Location {
122128 * Subscribe to the platform's `popState` events.
123129 */
124130 subscribe (
125- onNext : ( value : any ) => void , onThrow : ( exception : any ) => void = null ,
131+ onNext : ( value : PopStateEvent ) => void , onThrow : ( exception : any ) => void = null ,
126132 onReturn : ( ) => void = null ) : Object {
127133 return this . _subject . subscribe ( { next : onNext , error : onThrow , complete : onReturn } ) ;
128134 }
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export declare class Location {
7474 path ( includeHash ?: boolean ) : string ;
7575 prepareExternalUrl ( url : string ) : string ;
7676 replaceState ( path : string , query ?: string ) : void ;
77- subscribe ( onNext : ( value : any ) => void , onThrow ?: ( exception : any ) => void , onReturn ?: ( ) => void ) : Object ;
77+ subscribe ( onNext : ( value : PopStateEvent ) => void , onThrow ?: ( exception : any ) => void , onReturn ?: ( ) => void ) : Object ;
7878 static joinWithSlash ( start : string , end : string ) : string ;
7979 static normalizeQueryParams ( params : string ) : string ;
8080 static stripTrailingSlash ( url : string ) : string ;
@@ -239,6 +239,13 @@ export declare abstract class PlatformLocation {
239239 abstract replaceState ( state : any , title : string , url : string ) : void ;
240240}
241241
242+ /** @experimental */
243+ export interface PopStateEvent {
244+ pop ?: boolean ;
245+ type ?: string ;
246+ url ?: string ;
247+ }
248+
242249/** @stable */
243250export declare class SlicePipe implements PipeTransform {
244251 transform ( value : any , start : number , end ?: number ) : any ;
You can’t perform that action at this time.
0 commit comments