Vladimir
Vladimir

Reputation: 1789

Server side not render http requests [Angular Universal]

I have problem to get any staff from http request from apis when I do 'view source', it looks like that staff not comming from server.

So I can see static html in source but nothing from http requests....

Anyone know what can be a problem?

I am using universal-cli

Edit:

here is example of http call from my 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());
  };

}

Here is live example: http://pushsc.com/show/code/58bc83760a58d602a0b99d14 check source code of html... It render evertying expect things that comes from http...

Upvotes: 10

Views: 2277

Answers (1)

Maks K
Maks K

Reputation: 3914

Try update your angular to 4.0.0.

They fixed some bugs which was related to server side rendering.

Upvotes: 2

Related Questions