How to implement a bootstrap menu in an Angular project?

0

I put the following code and it did not work;

<nav class="navbar navbar-default">
    <div class="container-fluid">
      <div class="navbar-header">
        <a class="navbar-brand" href="#">WebSiteName</a>
      </div>
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Page 1</a></li>
        <li><a href="#">Page 2</a></li>
        <li><a href="#">Page 3</a></li>
      </ul>
    </div>
  </nav>

It was supposed to look like this:

Navbar

My settings are from my Angular, is something missing? is in the .angular-cli.json

  "styles": [
        "../node_modules/font-awesome/css/font-awesome.min.css",
        "../node_modules/primeng/resources/primeng.min.css",
        "../node_modules/primeng/resources/themes/omega/theme.css",
        "../node_modules/bootstrap/dist/css/bootstrap.css",

        "styles.css"
      ],
      "scripts": [ "../node_modules/bootstrap/js/dist/collapse.js"],
    
asked by anonymous 23.03.2018 / 16:54

1 answer

1

Normally, jQuery should also be included before using collapse.js or use Bootstrap UI if you do not want to include jQuery in angular design.

    
23.03.2018 / 17:19