I am building a web application in Angular2 using Angular-Cli. We are going to deploy it in production, so we are trying to build it.
Since we will not use Node as a web server, we will need to use the standalone package (dist directory) generated by
ng build --prod --aot
Right now, if we do this, the browser loads all the assets (JS, CSS, images, etc.) correctly (no 404), and the application loads (it is fully used). The fact is that it does not display CSS style, it is just an unidentified HTML document.
It is strange that if the application is running by
ng serve
then only some styles are loaded.
Any clue on what might happen?
Versions:
- Angular2: 2.2.1
- Angular-Cli: 1.0.0-beta.22-1
- Typescript: 2.0.10
Thanks!
EDIT: CSS example does not turn on:
.timeline-icon { text-align: center; line-height: 40px; } .btn-clear-timeline { margin-bottom: 10px; } .panel-no-mb { margin-bottom: 0px; }
source share