Mám integrovanou úhlovou aplikace uvnitř spring boot aplikaci.. tj. úhlové stavět soubory jsou umístěny uvnitř statické složky spring boot aplikaci jako následující obrázek.
I have defined two angular routing urls like
1. http://localhost:8080/pageone
2. http://localhost:8080/pagetwo
když jsem přístup k výše uvedené urls
z prohlížeče, který are handled by server
(spring boot aplikaci) a přímo not by the angular
. tak I end up in page not found
.
We can redirect to index page
od jara boot, jako je tento
@GetMapping("/")
public RedirectView welcome(RedirectAttributes attributes) {
//attributes.addFlashAttribute("flashAttribute", "redirectWithRedirectView");
//attributes.addAttribute("pageToRequest", "paymentoverview");
return new RedirectView("index.html");
}
but
můžeme only redirect to index.html
stránka not to routing urls "/pageone" or "/pagetwo"
.
Nechci skončit v indexu stránku.
Somehow I wan't to end up in respective page that I accessed from browser automatically,
even after redirect to index page also fine.
Snažil jsem se poslat atributy spolu s index.html,, ale to nefunguje. Jak můžeme tento problém vyřešit.