I am going to develop a simple Angular 2 application. I have created a project with routing, using Angular CLI and added several components to the app using \'ng generate co
Change your index.html
to
Because we are using Tomcat we have mentioned this(.) for Routing is based on this(/) So same like http-server
I mean running normally ng serve you have seen only
http://localhost:4200/
but run in server you have put your build into(dist) in webapps
so its come like
http://localhost:8080/dist/
so you need to add
i think this is the problem for you may be solved.