Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get previous url angular

  // private router: Router//inject
    this.router.events
    .pipe( filter(        (evt:any)=>evt instanceof RoutesRecognized),pairwise())
    .subscribe((events: RoutesRecognized[]) =>{        
        console.log('previous',events[0].urlAfterRedirects);//previous url
        console.log('current url',events[1].urlAfterRedirects);//current url
      }    );
Comment

PREVIOUS NEXT
Code Example
Javascript :: creating a class in angular 
Javascript :: return fetch javascript 
Javascript :: get highest value in array of object javascript 
Javascript :: sotre json on chrome storage 
Javascript :: python range in javascript 
Javascript :: mongoose connect to mongodb 
Javascript :: react native copy to clipboard 
Javascript :: how to use if in setstate 
Javascript :: js event preventdefault continue 
Javascript :: string contains string javascript 
Javascript :: iterate over enum angular ngfor 
Javascript :: discord js check if person banned 
Javascript :: method to look for objects in arrays by id 
Javascript :: url regex javascript 
Javascript :: when a form is subbmited jquery 
Javascript :: javascript map max value 
Javascript :: unexpected end of json input while parsing near 
Javascript :: css lint 
Javascript :: react router dom current path hook 
Javascript :: settimeout javascript see how much time is left 
Javascript :: javascript format float 
Javascript :: js insertbefore 
Javascript :: lodash sumby 
Javascript :: javascript remove all children with class 
Javascript :: react font-awesome 
Javascript :: node array 
Javascript :: firestore add document 
Javascript :: vite.config.js 
Javascript :: replace space with hyphen/dash javascript 
Javascript :: how to convert array into string in js 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =