1

I have added bootstrap dependencies in index.html file. this index file is in src folder. and node modules is in above it. Folder structure is given below.

Library
  node_modules
  src
    index.html

Now I am targeting to node_modules from index.html. My code is given below.

   <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
   <script src="../node_modules/jquery/dist/jquery.min.js"></script>

And also tried with ./ and just starts from node_modules. What is the problem here.

8
  • Is the file for bootstrap there in the first place? Commented Mar 27, 2017 at 7:08
  • Its there in node_modules Commented Mar 27, 2017 at 7:09
  • If you have a angular-cli.json file, put the resource to bootstrap in there under styles Commented Mar 27, 2017 at 7:13
  • Its problem with jquery as well Commented Mar 27, 2017 at 7:14
  • Maybe try this? stackoverflow.com/questions/39511788/… Commented Mar 27, 2017 at 7:16

1 Answer 1

3
  • Please check whether the file is available in under node_modules
    • import that CSS inside styles.css file, that will be compiled automatically

Hope you are using angular-cli package

@import '~bootstrap/dist/css/bootstrap.min.css';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.