Getting Unknown Provider error when injecting a Service into an Angular unit test
问题 I'm fairly new to Angular and have reviewed all the similarly related questions on Stack Overflow but none have helped me. I believe I have everything set up correctly but am still getting an 'Unknown Provider' error when attempting to inject a service into a unit test. I have laid out my code below - hopefully someone can spot an obvious error! I define my modules in a seperate .js file like this: angular.module('dashboard.services', []); angular.module('dashboard.controllers', []); Here is