阅读时,我想我应该给我的Angular2-评估项目一个录像带。但是在磁带测试文件中使用带有import {TestBed, async} from '@angular/core/testing';的Testbed似乎不能直接解决问题。编译TS文件是可行的,但是如果有错误,运行js文件会产生zone错误。我还不会用代码来打扰你。我的问题更重要:有没有人在Angular</
let service: MyService; TestBed.configureTestingModule({providers: [MyService], service = TestBed.get(MyService);(HttpClient来自@angular/common/http)。如果我在测试类中将HttpClient添加到提供者数组中,那么Ht
TypeError: this.alertService.danger is not a function 这是我的组件, import { Component, OnInit, ViewChild,ElementRef, AfterViewChecked } from '@angular/core';importthis.changeSomething();
} else if(t