-
-
Save iradofurioso/215be8c084bd50443091f6181598dba3 to your computer and use it in GitHub Desktop.
Updating Current URL in Angular 7 Apps | Pretty URL | Friendly URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import location | |
import {Location} from '@angular/common'; | |
// add in constructor | |
private location: Location | |
//Updating current url | |
this.location.replaceState(`/my/url/${this.code}/${this.id}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment