Code works fine in dev mode. But not work after deploying to apache.
AppModule works, and other lazy module cannot work, link path is not same with the static files path.
Home page path is http://127.0.0.1
, and click lazy-module it will find path from /
.
My js files are under static
folder.
Static files loads here , e.g. browser access path is 'http://127.0.0.1/static/4-es5.js'
D:/web/staticsites
└─4-es5.js
└─4-es2015.js
└─...
└─main-es5.js
When I click lazy-router module link console prompt
(missing: http://127.0.0.1/4-es2015.js)
How to make angular load the path to http://127.0.0.1/static/4-es2015.js
?
Apache Config
Alias /static D:/web/staticsites
<Directory D:/web/staticsites>
AllowOverride None
Options None
Require all granted
</Directory>