Newbie Question About Using Atmosphere Packages


#1

I’m trying to use this package here:

https://atmospherejs.com/jiku/bootstrap-toggle

I’ve installed it, however, Meteor doesn’t seem to find the stylesheet & JS when I try to use it in my templates.

Do I have to reference a link to the stylesheet and JS directly in my template for it to work?

(In this case: /node_modules/bootstrap-toggle/js & node_modules/bootstrap-toggle/css.)


#2

Per the source code, it adds the stylesheet and a script to the head with addresses referring to the CDN for these files. Check in your if these are added properly, and if so, that they are downloaded by looking in your developer tools


#3

The JS shows in the source code:
<script type="text/javascript" src="/packages/jiku_bootstrap-toggle.js?44b922a69ac4d167463a5180c97d242c6d1248d8"></script>

But no stylesheet. There’s a merged stylesheet:
<link rel="stylesheet" type="text/css" class="__meteor-css__" href="/merged-stylesheets.css?e5c7c4cd07aa81bda61bc325edaea76f22dccd0d">

But bootstrap-toggle doesn’t seem to render properly.

When I add this to the template it works:

<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.0/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.0/js/bootstrap-toggle.min.js"></script>

What am I doing wrong?


#4

It seems to be a conflict with zmq package. When I uninstall zmq the toggle switch renders properly. However, zmq as far as I can tell does not have any css.

Any ideas why zmq would conflict with the bootstrap-toggle css when zmq has no css?