My Angular application is divided into several subpaps. I work with laravel, who is also responsible for routing between subapps.
So there are the following urls handled by laravel:
ModuleX: /moduleX
ModuleY: /moduleY
ModuleZ, Item n: /moduleZ/item-n (unlimited items)
And finally, on top of them there are my 3 Angular subapps. For example:
/moduleZ/item-1/#/hello/world
In addition, laravel's templates, partial files, and RESTful APIs are served by the following URLs:
/templates
/partials
/api
If I set the base url with the html <base href="http://www.example.com/app/"> , I can use relative URLs for templates, partitions and api, but not for routing. I still have to add part of the module url like moduleX/#/hello/world .
If I set the base url, for example, <base href="http://www.example.com/app/moduleX/"> , I can write all the links, such as #/hello/world , but templates, partial and queries api no longer work.
The entire application is also located in a subfolder, so I can’t just use, for example, /templates .
So basically my problem or question now is, what is the best way to handle various base URLs? I don't really like adding a module name to every link.