Open Closed

How Can I custom the URL? #6994


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. image.png


5 Answer(s)
  • 0
    ismcagdas created

    Hi @GSOFT

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

  • 0
    GSOFT created

    Hi @ismcagdas

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

  • 0
    ismcagdas created

    @GSOFT

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

  • 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.

  • 0
    ismcagdas created

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