In my Angular10 project, I have a folder in my assets (declared in angular.json
) that I don't want to be navigated if you type the full url in the browser.
But still it has to be usable if I use it in my code ex:
<img src="./assets/brand/logo.png">
<- This shows the logo
http://localhost:4200/assets/brand/logo.png
<- If I type this in the browser it should redirect me on the homepage
Can I achieve this with the app-routing.module.ts
?
EDIT: Ok, Thanks! Now I understand I cannot achieve this by using angular.
I will use Docker
with Nginx
to serve the application. Is it possible to achieve this with Nginx
?