当我尝试传递Injector
给beforeEachProviders
in 测试时,我收到以下错误。
Failed: Cannot resolve all parameters for 'Injector'(?, ?, ?, ?, ?).
Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'Injector' is decorated with Injectable.
我使用的代码
import { Injector } from 'angular2/core';
describe(() => {
beforeEachProviders(() => [Injector]);
});
什么不见了?我应该给提供者什么才能实例化它?