Can't Toggle Navbar in Bootstrap 4 in Angular

前端 未结 10 2633
借酒劲吻你
借酒劲吻你 2020-12-14 00:42

Why i can\'t toggle navbar when resizing to mobile screen in angular 4 using bootstrap 4. I included it in the angular cli in script and styles, the node modules from bootst

10条回答
  •  别那么骄傲
    2020-12-14 01:27

    @Joseph, it looks like you haven't installed the dependencies for bootstrap (and bootstrap itself) for the navbar toggle to work.

    If you open up terminal or the command line and navigate to the directory that contains your package.json file, run the following commands:

    npm install --save jquery
    npm install --save popper.js
    npm install --save bootstrap@4.0.0-beta
    

    These commands will install the requisite dependencies for you project. They're fairly explicit in what they're doing, but if you need a refresh on what they're doing or how they work, I would suggest looking at the documentation for npm install located here.

    After they're installed, you'll want to make sure you include them in your .angular-cli.json file, so you're angular app can use them.

提交回复
热议问题