Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91275115
navigation-service.service.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 9, 14:08
Size
724 B
Mime Type
text/x-java
Expires
Mon, Nov 11, 14:08 (2 d)
Engine
blob
Format
Raw Data
Handle
22234443
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
navigation-service.service.ts
View Options
import {Injectable} from '@angular/core';
import {ActivatedRoute, Params, Router} from '@angular/router';
@Injectable()
export class NavigationServiceService {
constructor( private router: Router,
private activatedRoute: ActivatedRoute ) {
}
/**
* updateRoute
* routes to the active url with the actual or passed query params of this class.
*/
updateRoute(qParams?: Params, relPath?: string) {
if ( relPath ) {
this.router.navigate([relPath], { relativeTo: this.activatedRoute, queryParams: qParams, queryParamsHandling: 'merge' });
} else {
this.router.navigate([], { relativeTo: this.activatedRoute, queryParams: qParams, queryParamsHandling: 'merge' });
}
}
}
Event Timeline
Log In to Comment