Can someone assist me with creating an if-statement in my program to determine the current route or path I'm on?
I have a function that should only execute when I'm on a specific path. For instance, if the path is "homepage", then I know I'm on the homepage. However, if the URL includes "homepage/add", I want to trigger a different function. I attempted to use the code:
if(this.router.url.include('add') { .... code ... }
, but it did not work as expected. Any help would be greatly appreciated!
Thank you!