Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module 'ya.nouislider' is not available #29

Open
nmckeown opened this issue Jan 10, 2017 · 7 comments
Open

Module 'ya.nouislider' is not available #29

nmckeown opened this issue Jan 10, 2017 · 7 comments

Comments

@nmckeown
Copy link

nmckeown commented Jan 10, 2017

Hi Yankovsky/Users,

Looks like a great plug in and is perfect for something I require.
I am having an issue installing though!

I can see it installed the libraries:

\www\assets\lib>
nouislider
nouislider-angular

I referenced the min.js and css in index.html.

index.html:

<script src="./assets/lib/nouislider/distribute/nouislider.min.js"></script>

Inject the module in app.js

app.js:
var app = angular.module('MyApp', [
'ionic',
'ngRoute',
'ya.nouislider'
]);

All files are saved but I am getting an injection error:

Error: [$injector:modulerr] Failed to instantiate module ya.nouislider due to:
Error: [$injector:nomod] Module 'ya.nouislider' is not available

The references in index.html are good as I can open them from editor. Is the module name correct?
Do I need to reference the js file in nouislider-angular folder?

Appreciate any assistance as not sure what I'm doing wrong!!

Thanks,
Noel

@Yankovsky
Copy link
Owner

Check the order of scripts, nouislider script should be before app.js

@Yankovsky
Copy link
Owner

@nmckeown ^

@nmckeown
Copy link
Author

Hi Andrey,

Thanks for getting back to me, was pretty simple actually, you need to include the js file from the nouislider-angular folder. This is not specifically referenced in the example.

<script src="./assets/lib/nouislider-angular/nouislider.min.js"></script>

I was using:

<script src="./assets/lib/nouislider/distribute/nouislider.min.js"></script>

The order before or after app.js seems ok, the error is gone now so hopefully all ok :-)

Thanks again for putting this together, looks great.

@nmckeown
Copy link
Author

Actually you need both like so:

<script src="./assets/lib/nouislider/distribute/nouislider.min.js"></script> <script src="./assets/lib/nouislider-angular/nouislider.min.js"></script>

@Arti3DPlayer
Copy link

have same error with npm

@fix2015
Copy link

fix2015 commented Oct 23, 2017

same pb

@Yankovsky
Copy link
Owner

@fix2015 @Arti3DPlayer @nmckeown I've added information about dependencies of this directive
https://github.com/Yankovsky/nouislider-angular/blob/master/examples/index.html

Does it solve your issue?

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

No branches or pull requests

4 participants