Batuhan Bakar
Batuhan Bakar

Reputation: 41

Angular.json Styles and Scripts doesn't work

I want to run my bootstrap on Angular project but in angular.json my Scripts and Styles does not working

I tried copy path from folder but it gives me error !!!

 "styles": [
          "C:\AngularCalismalar\intro\node_modules\bootstrap\dist\css\bootstrap.min.css"
        ],
        "scripts": [
            "C:\AngularCalismalar\intro\node_modules\jquery\dist\jquery.min.js",
            "C:\AngularCalismalar\intro\node_modules\bootstrap\dist\js\bootstrap.min.js"
        ]

Upvotes: 1

Views: 1368

Answers (1)

Adrita Sharma
Adrita Sharma

Reputation: 22203

Don't use the physical path, add relative path.

Try like this:

       "styles": [
            "./node_modules/bootstrap/dist/css/bootstrap.css"
        ],
       "scripts": [
            "./node_modules/jquery/dist/jquery.js",
            "./node_modules/bootstrap/dist/js/bootstrap.js",
        ]

Upvotes: 1

Related Questions