当我“查看源代码”时,要从apis获得来自http请求的任何人员都有问题,看起来工作人员没有从服务器开始工作。
所以我可以在源代码中看到静态html,但是从http请求中看不到任何东西.
有人知道什么是问题吗?
我正在使用universal-cli
编辑:
下面是来自我的showcode.service.ts的http调用的示例
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());
};
}下面是活生生的例子:http://pushsc.com/show/code/58bc83760a58d602a0b99d14检查html的源代码.它使所有的期望从http.
发布于 2017-03-25 10:54:35
尝试将您的角度更新到4.0.0。
他们修复了一些与服务器端呈现相关的bug。
https://stackoverflow.com/questions/42742169
复制相似问题