After finding a beautiful HTML and CSS template (see source code here), I decided to integrate it into my Angular 2 app (check out the source code here).
The HTML template was sourced from this repository (index.html
).
However, the issue lies within the Angular 2 source code
- You must
clone
the angular source. - Execute
npm install
- Run
ng serve
Unfortunately, it appears that the
<script src="assets/js/main.js"></script>
in index.html
is not being added correctly. Even though there are no errors in the console, the left menu is malfunctioning. This problem usually arises when main.js does not appropriately align.
This is what the correct html page should look like:
https://i.sstatic.net/kddVc.png
And this is the Angular page with a broken header and menu:
https://i.sstatic.net/FPsix.png
Despite the fact that the codes are identical, I have separated the HTML template into 3 components (header, menu, and app for main content).