Skip to main content
updated description
Source Link
Tushar Walzade
  • 3.8k
  • 4
  • 38
  • 60

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

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, route is an instance of ActivatedRoute

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, router is an instance of ActivatedRoute

added 105 characters in body
Source Link
Tushar Walzade
  • 3.8k
  • 4
  • 38
  • 60

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, route is an instance of ActivatedRoute

As of now, I'm getting my path as follows -

this.router.url.subscribe(value => { this.isPreview = value[0].path === 'preview'; }) 

Where, route is an instance of ActivatedRoute

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, route is an instance of ActivatedRoute

Source Link
Tushar Walzade
  • 3.8k
  • 4
  • 38
  • 60

As of now, I'm getting my path as follows -

this.router.url.subscribe(value => { this.isPreview = value[0].path === 'preview'; }) 

Where, route is an instance of ActivatedRoute