I have created n new angular app using angular-cli.
I completed the app and preview it using ng-serve, it is working perfectly.
After that I used ng build --
http-server doesn't support client-side routing, so nothing other than your base URL is going to work. Instead, you can use angular-http-server:
npm install -g angular-http-server
ng build --prod
cd dist
angular-http-server
This should only be used to test the app locally before deploying it on a Web server. To learn how to actually deploy the app on a Web server, check out the Angular.io article on deployment, which discusses considerations to make when building for deployment and provides configurations for a variety of different Web servers commonly used in production.