Vla*_*mir 9 angular-universal universal-cli angular
当我查看源代码时,我从apis获取http请求的任何工作人员都有问题,看起来工作人员没有从服务器上来.
所以我可以在源代码中看到静态html,但http请求中没有任何内容.
任何人都知道什么是问题?
我在用 universal-cli
编辑:
这是我的http调用示例showcode.service.ts:
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { environment } from '../../environments/environment';
@Injectable()
export class ShowcodeService {
constructor(private http: Http) { }
getCode(id): any{
return this.http.get(environment.baseUrl + 'code/show/' + id)
.map((response: Response) => response.json());
};
}
Run Code Online (Sandbox Code Playgroud)
这是现场的例子:http://pushsc.com/show/code/58bc83760a58d602a0b99d14检查html的源代码...它渲染evertying期待来自http的东西......
| 归档时间: |
|
| 查看次数: |
1213 次 |
| 最近记录: |