In my Angular 6 application, I am exploring the process of creating URL aliases. However, I have encountered a roadblock that I hope you can help me with:
In my angular app, I currently have a URL defined as article/:id
, which corresponds to the ArticleViewComponent
. Now, I want to create a different URL structure where the title of the article is used as the path instead of the ID. For instance, if there is an article titled Article about Angular
with ID 1
, I would like the URL to be /article/article-about-angular
, while still correctly mapping it to the article with ID 1
(as the API relies on the ID, not the title).
I appreciate any assistance or guidance you can provide on this matter, thank you in advance! I understand that this may seem challenging, but your expertise is greatly valued.