Angular App Responsive Only When served Through ng serve

227 views Asked by At

I am facing a really weird issue. I searched for it on SO and other websites but could not find any reference to this issue.

Basically, when I am serving the Angular Ngx-admin app using ng serve command, it becomes mobile responsive.

But as soon as I try to serve the ng build distribution files through a static server, the app loses the responsiveness.

I tried various ways like NodeJS http-server, simple NodeJS Express App, PM2 Serve (pm2 serve --spa) but everything is giving the same output.

I am not getting what is going wrong here.

Here's the screenshot of responsive app using ng serve

responsive app using ng serve


Here's the non-responsive app using static file serving

non-responsive app using static file server

0

There are 0 answers