I am trying to add a service to my app and can not see the problem. I must be missing something simple.
My App definition looks like: (lots of stuff removed in the service). The service will also be moved to a separate file once i figure out what i am doing wrong. That is why in this example it is a separate call;
var app = angular.module('app', ['ngRoute','ngResource', 'ngAnimate', 'ui.bootstrap', 'ui.tree', 'ngMap', 'ngTagsInput', 'angular-loading-bar', 'app.controllers'
, 'app.directives', 'app.localization', 'app.nav', 'app.ui.ctrls', 'app.ui.directives'
, 'app.ui.services', 'app.ui.map', 'app.form.validation', 'app.ui.form.ctrls', 'app.ui.form.directives', 'app.tables', 'app.task'
, 'app.chart.ctrls', 'app.chart.directives', 'app.page.ctrls'
, 'virtualAssistServices'
]
);
angular.module('app')
.service('virtualAssistServices', ['$http', function ($http) {
var urlBase = '/api/customers';
}]);
if I remove virtualAssistServices from the app definition every works fine, but as soon as i add to the app module i get the error
Error: [$injector:modulerr] Failed to instantiate module app due to: [$injector:modulerr]
Failed to instantiate module virtualAssistServices due to: [$injector:nomod] Module
'virtualAssistServices' is not available! You either misspelled the module name or
forgot to loadit. If registering a module ensure that you specify the dependencies
as the second argument.
http://errors.angularjs.org/1.2.27/$injector/nomod?p0=virtualAssistServices