Menu icon Foundation
Example for including other Angular modules?

I am trying to use some other angular modules with my app, for example angular-scroll (https://github.com/oblador/angular-scroll)

I installed it in my app (npm install angular-scroll)

And I added it to the angular.module section in /client/app/app.js:

angular.module('application', [
'ui.router',
'ngAnimate',
'angular-scroll',
'duScroll',

Yet when I run my app it says
Error: [$injector:nomod] Module 'angular-scroll' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

What do I need to do to install and use another module?

angularfaappsangular scroll

I am trying to use some other angular modules with my app, for example angular-scroll (https://github.com/oblador/angular-scroll)

I installed it in my app (npm install angular-scroll)

And I added it to the angular.module section in /client/app/app.js:

angular.module('application', [
'ui.router',
'ngAnimate',
'angular-scroll',
'duScroll',

Yet when I run my app it says
Error: [$injector:nomod] Module 'angular-scroll' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

What do I need to do to install and use another module?

Robert North over 4 years ago

After installing the bower version of angular-scroll, in my gulpfile.js I added the following to the appsJS array:

  'bower_components/angular-scroll/angular-scroll.js',

Instead of declaring 'angular-scroll' with angular.module, I took that out and just kept the dependency 'duScroll'.

Then I was able to use angular-scrolls in my app.

I'm not sure if this is the best way to do it, but it worked.