nouislider-angular icon indicating copy to clipboard operation
nouislider-angular copied to clipboard

Module 'ya.nouislider' is not available

Open nmckeown opened this issue 9 years ago • 7 comments

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:

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

nmckeown avatar Jan 10 '17 22:01 nmckeown

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

Yankovsky avatar Jan 10 '17 23:01 Yankovsky

@nmckeown ^

Yankovsky avatar Jan 10 '17 23:01 Yankovsky

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.

I was using:

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 avatar Jan 11 '17 18:01 nmckeown

Actually you need both like so:

nmckeown avatar Jan 11 '17 19:01 nmckeown

have same error with npm

Arti3DPlayer avatar Feb 01 '17 19:02 Arti3DPlayer

same pb

fix2015 avatar Oct 23 '17 08:10 fix2015

@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?

Yankovsky avatar May 17 '19 07:05 Yankovsky