我刚刚将 RC3 更新为 RC4,现在我在测试中遇到了这个错误:
Error: overrideDirective is not supported in this implementation of TestComponentBuilder
在TestComponentBuilder
里面@angular/core@2.0.0-rc.4/testing/test_component_builder.js
我可以看到这个方法的声明
TestComponentBuilder.prototype.overrideDirective = function(componentType, from, to) {
throw new Error('overrideDirective is not supported in this implementation of TestComponentBuilder.');
};
所以现在的问题是:我如何覆盖指令?