Skip to content Skip to sidebar Skip to footer

Referencing A Parent Directory In Html

As far as references to directories are concerned, I understand ./ = current ../ = parent But I am having a problem referencing my bower_components directory in this bit of HTML c

Solution 1:

Try going to <your server>/bower_components/bootstrap/dist/js/bootstrap.min.js

It probably won't work. If your server setup is normal only public and the folders below it are accessible from the client side. From the client point of view public is the root, there is nothing above that.

As for importing bootstrap, see if you can browse what node is making available in your browser. It's probably hosting the scripts you need to reference on the client side at another url. You might also find the url in the bower documentation/examples.

You could solve this by copying or symlinking the scripts into the public directory, but that would be a bit hackish, save it for if you get completly fed up with finding the intended way.

Solution 2:

Maybe you can try this

<script src="contacts/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

just use the full script path

Post a Comment for "Referencing A Parent Directory In Html"