As of now, I'm getting my path as follows -
this.router.url.subscribe(value => { // you may print value to see the actual object // console.log(JSON.stringify(value)); this.isPreview = value[0].path === 'preview'; }) Where, routerouter is an instance of ActivatedRoute