I would like to inject a service into another service but, for some reason, the "@Inject" decorator is being ignored. For example, the following service depends on another service:
@Injectable()
class MyService {
final AnotherService _service;
MyService(@Inject(AnotherService) this._service);
// ... more methods
}
Angular2 throws the following error:
ORIGINAL EXCEPTION: No provider for AnotherService!
Am I using the "@Inject" decorator in a bad way?