I have an angular project which has multiple routes say /category/fruit/apple so the full url is http://myserver/category/fruit/apple through router link everything is fine but if I open this link directly in typing in URL then it is 404 my backend is nodejs with express. And the 404 make sense as there is no route configured like this.
My Question, In this kind of situation how should I handle?
I thought I had, redirect to root http://myserver?path=category-fruit-apple and from the root component do the dynamic routing. Is it the correct way ?
Please suggest the best way.