Questions tagged [universal-cli]

10 questions
10
votes
1 answer

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…
Vladimir
  • 1,751
  • 6
  • 30
  • 52
2
votes
0 answers

angular-cli to universal-cli [Angular2]

In existing angular-cli project I am trying to integrate universal... I follwed guide from here: https://github.com/devCrossNet/universal-cli But after I do ung serve I get…
Vladimir
  • 1,751
  • 6
  • 30
  • 52
2
votes
1 answer

'router-outlet' is not a known element Angular 2

I am using universal-cli... My app.node.module.ts look like this: /** * This file and `main.browser.ts` are identical, at the moment(!) * By splitting these, you're able to create logic, imports, etc that are "Platform" specific. * If you want…
Vladimir
  • 1,751
  • 6
  • 30
  • 52
1
vote
1 answer

How to store token on server side [Angular Universal]

I found this post: https://github.com/angular/universal/issues/272 where user @gdi2290 explain how to add that functionalty But I get error in my code: /home/master/Documents/rs-dash/dist/server/server.bundle.js:317 throw new Error("Module build…
Vladimir
  • 1,751
  • 6
  • 30
  • 52
1
vote
0 answers

How to check current route in Angular Universal?

For basic Angular2 it is possible to check current route like this: this.subscription = router.events.subscribe((val: any) => { }); But there is problem when use Angular Universal on server side... Any solution for this?
Vladimir
  • 1,751
  • 6
  • 30
  • 52
1
vote
0 answers

Angular Universal http server side rendering

I am using universal-cli and I try to make SEO friendly site but have problem with http request it just not rendering, here is live example: http://pushsc.com/show/code/58bc83760a58d602a0b99d14 I just get static elements but not those which come…
Vladimir
  • 1,751
  • 6
  • 30
  • 52
1
vote
0 answers

BaseUrl is not working in universal-cli but it works in the angular-cli

So I've got a problem which I don't know how to fix.. Basically I'm using "baseUrl": "." in my tsconfig.json file which allow me to do imports starting from the root folder. But when I'm using the universal-cli which supports universal, and then…
Chrillewoodz
  • 27,055
  • 21
  • 92
  • 175
0
votes
2 answers

Get http request on server side works but not display on client side [Angular Universal(universal cli)]

I have request like this: import {Component, OnInit} from '@angular/core'; import { Http, Response } from '@angular/http'; import {Observable} from 'rxjs'; import 'rxjs/add/operator/map'; import {isNode} from 'angular2-universal'; @Component({ …
Vladimir
  • 1,751
  • 6
  • 30
  • 52
0
votes
0 answers

Angular-cli how to put html content from index.html into app.component.html

I need to edit head tag from index.html... So it would be useful if I can insert content from index.html to my app.component.... Any solution for this?
Vladimir
  • 1,751
  • 6
  • 30
  • 52
0
votes
0 answers

Third part libs and Angular Universal [Angular 2]

I am using prism.js in my project and when I switch to universal-cli I get error in terminal from server side ReferenceError: Prism is not defined in angular-cli.json I have prism script: "scripts": [ "assets/prism.js" ] And from component I…
Vladimir
  • 1,751
  • 6
  • 30
  • 52