I'm currently working on a MEANJS application and I want to integrate Snoocore into an AngularJS controller.
Find more about Snoocore here
'use strict';
angular.module('core').controller('HomeController', ['$scope', 'Authentication', 'Snoocore', function($scope, Authentication, Snoocore) {
// Setting up the authentication context
$scope.authentication = Authentication;
var reddit = new Snoocore({
userAgent: 'test@documentation',
oauth: {
type: 'implicit',
mobile: true,
key: '',
redirectUri: 'redirectUri set for your app',
scope: [ 'read', 'flair', 'identity' ]
}
});
}
]);
I have added Snoocore via Bower and it can be found at
public/lib/snoocore
The controller file is located at
public/modules/core/controllers/home.client.controller.js
However, I am facing issues with the implementation and not sure what's going wrong. Being new to Angular and MEANJS, I could use some guidance.
The console is showing this error message:
Error: [$injector:unpr] Unknown provider: snoocoreProvider <- snoocore
http://errors.angularjs.org/1.2.28/$injector/unpr?p0=snoocoreProvider%20%3C-<section data-ui-view="" class="ng-scope">noocore
at http://localhost:3000/lib/angular/angular.js:78:12
at http://localhost:3000/lib/angular/angular.js:3801:19
at Object.getService [as get] (http://localhost:3000/lib/angular/angular.js:3929:39)
at http://localhost:3000/lib/angular/angular.js:3806:45
at getService (http://localhost:3000/lib/angular/angular.js:3929:39)
at invoke (http://localhost:3000/lib/angular/angular.js:3956:13)
at Object.instantiate (http://localhost:3000/lib/angular/angular.js:3976:23)
at http://localhost:3000/lib/angular/angular.js:7315:28
at chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1544:22
at http://localhost:3000/lib/angular/angular.js:6711:34