-
Notifications
You must be signed in to change notification settings - Fork 494
Description
Hi, I am struggling with adding new modules (through bower) with services in them. When I install library with directives it works flawlessly, but when I try to use services (for example angular-local-storage
service) it crashes with "Unknown provider".
Here is example of my index.js
:
angular.module('angularMaterialAdmin', [ 'ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ui.router', 'ngMaterial', 'nvd3', 'materialCalendar', 'angularMoment', 'LocalStorageModule', 'app' ])
Here I configure local storage module in config phase, and everything is OK:
localStorageServiceProvider.setPrefix('mathesio-zikmund');
But when I try to use this service in App module like this:
angular.module('app', ['ngMaterial', 'LocalStorageModule']) .controller('omgController', [ 'LocalStorageModule', function(localStorageService) { console.log(localStorageService, 'z omg!'); } ]);
It crashes: Unknown provider: LocalStorageModuleProvider <- LocalStorageModule <- omgController
I know I must be doing something terribly wrong, but I can't see it. Any help would be great.
Best regards,
Pirozek