I'm following along with this tutorial: https://codeburst.io/getting-started-with-angular-7-and-bootstrap-4-styling-6011b206080
I have freshly generated a new angular project with the cli. included routing, scss stylesheets.
I have performed an npm install bootstrap jquery, and included them as follows:
angular.json
"projects": {
"myproject": {
...,
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
...,
"styles": [
"src/styles.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
],
...
The bootstrap stylesheet is included in the styles.scss, so I can override variables if I want:
styles.scss
@import '~bootstrap/scss/bootstrap.scss';
Then I added a navbar as follows:
<nav class="navbar navbar-fixed-top navbar-dark bg-inverse">
<a class="navbar-brand">Angular Router</a>
<ul class="nav navbar-nav" routerLinkActive="active">
<li class="nav-item"><a class="nav-link" routerLink="home">Home</a></li>
<li class="nav-item"><a class="nav-link" routerLink="about">About</a></li>
<li class="nav-item"><a class="nav-link" routerLink="courses">Courses</a></li>
</ul>
</nav>
When serving the page it renders like this:
The only reason the links are visible is because I selected them. Their font appears to be white. The navbar itself is not rendered as I would expect from bootstrap.
What am I missing? I see no errors in the console or developer tools.
EDIT: The question was marked as a duplicate of how to add bootstrap in angular 6. However, it is not, since I have followed the steps in that answer as you can see from the code I posted, and it still does not work.
EDIT 2: There are no warnings or errors in the console. It even shows that the styles are found, so I doubt that this is an installation/import problem.