import { Injectable } from '@angular/core' ; import { ActivatedRoute , Params , Router } from '@angular/router' ; import { RouterAdapter , RouterOptions } from './router-adapter.interface' ; internal @ Injectable ( ) export class DefaultRouterAdapter implements RouterAdapter { constructor ( private router , private route ) { } public get url ( ) { return this . router . url ; } public get queryParamMap ( ) { return this . route . queryParamMap ; } public navigate ( queryParams , extras = { } ) { return this . router . navigate ( [ ] , { relativeTo : this . route , queryParamsHandling : 'merge' , queryParams : queryParams , ... extras , } ) ; } public getCurrentNavigation ( ) { return this . router . getCurrentNavigation ( ) ; } }