How to navigate in Angular 4 with filter url subscribe -


i want change url in browser without notify activatedroute changes, run code in subscribe of url, when component initializing or user click in browser undo/redo

ngoninit() {    this.form = this.initform();    this.activatedroute.url.subscribe(params =>    {       //run when component loading or user click undo/redo in browser      this.form = this.initform();    });  }   public submit(): void {    let url = this.urlbuilder.build(this.form);   //change url in browser , add history, without notify activatedroute changes   this.router.navigatebyurl(url);  } 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -