Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Requirements for installation are not clear #73

Open
kjaquier opened this issue Jun 23, 2015 · 11 comments
Open

Requirements for installation are not clear #73

kjaquier opened this issue Jun 23, 2015 · 11 comments

Comments

@kjaquier
Copy link

Just include slider.js and use the package ui.bootstrap-slider.

I actually had to include seiyria-bootstrap-slider/dist/bootstrap-slider.min.js and seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css too.

Also, looking at the code, I'm not sure it works without jQuery, like the original plugin is supposed to. It would really be a plus, since most angular modules for UI still require it...

@seiyria
Copy link
Owner

seiyria commented Jun 23, 2015

Yes, it is implied that bootstrap slider is already included. If you'd be willing to submit a PR on that, I'd take that.

You are correct, this does look for $.fn.slider and it is untested without jQuery. However, Angular, by default, has jqLite and IIRC if bootstrap-slider detects any jQuery namespace it will attach to it, which makes this a moot point. That said, if you have a plnkr that demonstrates this case, I'd be happy to take a look at it, but a PR would be overall a lot more helpful. As you said though, a lot of Angular plugins are just jQuery wrappers in disguise, so I'm not sure relying on jQuery is that much of a detriment.

@tobilg
Copy link

tobilg commented Jul 1, 2015

I second both points, it would be great if the actual installation hints would be complete. When using it without jQuery, I see an $ is not defined error in the console, so IMHO there's no automatic usage of jqLite.

@seiyria
Copy link
Owner

seiyria commented Jul 1, 2015

That's strange. In any event, if someone really needs the jQuery dependency to be removed, feel free to submit a PR. I suppose I'll flesh out the docs a bit more to say you do need to include bootstrap-slider (though I still feel this is a given).

@zauker
Copy link

zauker commented Sep 21, 2015

Sorry guys, but i'm not understand what are the requirements.
For basic usage I need to install, bootstrap (and include the CSS), angular, angular-bootstrap-slider and?
seiyria/bootstrap-slider?
other package?
could you give me the minimun installation required via bower command?
I'm trying but i have not errors bat also i have not the slider too.
Thanks

@seiyria
Copy link
Owner

seiyria commented Sep 21, 2015

Yes, you need to install bootstrap-slider. That is implied when I say:

See bootstrap-slider for examples and options.

and

You will also need to include bootstrap-sliders CSS and JS.

bower should already install seiyria-bootstrap-slider as well.

@zauker
Copy link

zauker commented Sep 21, 2015

Thank you for your fast response,
I've made a little example on plunker but it doesn't works.

http://plnkr.co/edit/wumvDyTDAZiG4P2KlsLQ?p=preview

Coul'd you check if I miss something?
Thanks

@seiyria
Copy link
Owner

seiyria commented Sep 21, 2015

Yes, you forgot to require the module ui.bootstrap-slider.

@zauker
Copy link

zauker commented Sep 21, 2015

Concerning ui.bootstrap-slider you mean the Angular UI Bootstrap or jQuery ones?

http://angular-ui.github.io/bootstrap/
https://jquery-ui-bootstrap.github.io/jquery-ui-bootstrap/components.html#slider

Could you kindly write me the right ui.bootstrap-slider project page (or bower or CDN link) so i'll try to add into my sample.
thanks

@seiyria
Copy link
Owner

seiyria commented Sep 21, 2015

... You literally just have to add it as a module dependency, like so:

(function () {
    var app = angular.module("sliderApp", ['ui.bootstrap-slider']);

    app.controller('sliderCtrl', function($scope, $http) {
        this.sliderValue = 24;
    });
})();

You can see here that that is what I've chosen to call this module.

@zauker
Copy link

zauker commented Sep 21, 2015

Oh damn,
I was checking about the files inclusions and I did not realize that I forgot to load the module.
Now it works fine, thank you for your support.

@jice-lavocat
Copy link

This is pretty obvisous, but I guess, people might forget about the module inclusion at first (I did).
This might be great to add a line about it in the doc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants