d-oliveros/ngSmoothScroll

Error: [$injector:unpr] Unknown provider: smoothScrollProvider <- smoothScroll <- IndexCtrl

johhansantana opened this issue · 2 comments

I'm using Angular-meteor to do my application. I'm trying to create a smoothscroll anchor so when a user clicks on a button it goes in the same view to an anchor somewhere in the view.

I'm trying to implement this plugin but when I do

'use strict'

angular.module('myApp')
.controller('IndexCtrl', ['$scope', '$meteor', '$anchorScroll', '$location', 'smoothScroll',function ($scope, $meteor, $anchorScroll, $location, smoothScroll) {
...
}]);

I get the title error.

What am I doing wrong?

You have to declare your module to depend on the module 'smoothScroll'.

So, change your code to create your module 'myApp' to:
angular.module('myApp', ['smoothScroll']);