我需要提醒我的文件文本,但现在显示未定义。我的代码
export class AppComponent2 {
constructor(private _router: Router,private http:Http) {
this._router.events.subscribe((events) => {
Observable.forkJoin( this.http.get("http://localhost:3000/app/components/component1.ts"))
.subscribe(e => {this.result =e});
})
alert(this.result);
}
}