Unfortunately, there is no such Service but there are many workarounds to get the previous route or URL, please take a look at this https://github.com/angular/angular/issues/11268
– Ismail RBOUHApr 06 '17 at 15:53
This question isn't at all a duplicate of the link provided. The link is for detecting an event (routing change) whereas this question is looking for a property (previous navigation location).
– GregApr 10 '18 at 22:39