Base solution for your next web application
Open Closed

How Can I custom the URL? #6994


User avatar
0
GSOFT created

I have a Url, 'localhost/app/main/A/B', I want to change url to 'localhost/B'. Is it possible? And How I can?, I place some lines in root-routing like this.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @GSOFT

    Yes, this is correct. But be sure that you have removed the route definiton from main-routing.module.ts.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    GSOFT created

    Hi @ismcagdas

    I did it and get this Seem like, I have to import all of the module and component to Root Module

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @GSOFT

    It seems like that. I checked again and couldn't find a better way to do it in Angular.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    GSOFT created

    Hi @ismcagdas

    I truly want to modify the URL more friendly for SEO, If you have any clue, please let me know.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @GSOFT sorry, I don't have any other suggestion.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)