src/client/app/modules/core/testing/mocks/router-extensions.mock.ts
Methods |
back |
back()
|
Returns :
void
|
navigate |
navigate(commands: Array
|
Returns :
Promise<boolean>
|
navigateByUrl |
navigateByUrl(url: string|, options: ExtendedNavigationExtras)
|
Returns :
Promise<boolean>
|
import { Injectable } from '@angular/core';
import { UrlTree } from '@angular/router';
import { IRouterExtensions, ExtendedNavigationExtras } from '../../services';
@Injectable()
export class RouterExtensionsMock implements IRouterExtensions {
navigate(commands: Array<any>, extras?: ExtendedNavigationExtras): Promise<boolean> {
return Promise.resolve(true);
}
navigateByUrl(url: string | UrlTree, options?: ExtendedNavigationExtras): Promise<boolean> {
return Promise.resolve(true);
}
back(): void {
return;
}
}