Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80626953
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
Sun, Sep 1, 18:15
Size
724 B
Mime Type
text/x-java
Expires
Tue, Sep 3, 18:15 (2 d)
Engine
blob
Format
Raw Data
Handle
20410389
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