question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

adding support for platform-server (server-side rendering) using Angular CLI

See original GitHub issue
- [ ] bug report -> please search issues before submitting
- [*] feature request

Versions.

@angular/cli: 1.3.1
node: 7.10.0
os: linux x64
@angular/animations: 4.3.5
@angular/common: 4.3.5
@angular/compiler: 4.3.5
@angular/core: 4.3.5
@angular/forms: 4.3.5
@angular/http: 4.3.5
@angular/platform-browser: 4.3.5
@angular/platform-browser-dynamic: 4.3.5
@angular/platform-server: 4.3.5
@angular/router: 4.3.5
@angular/cli: 1.3.1
@angular/compiler-cli: 4.3.5
@angular/language-service: 4.3.5

Feature request proposal

angular/universal has been merged into Angular 4.0, and we already know it as platform-server, and eveyone links to this directory to points out that universal lives inside Angular from now! Unfortunately, the problem is there is no official documentation tutorial on angular.io website to clarify how to use platform-server, or what’s the correct way to use platform-server, and users should struggle around to find an unofficial way to create their own server config, and other options to add server-side rendering for their website. It’s fine as long as they can run their app with platform-server support, but the problem is when it comes to a bigger community, we need to have a unified method of creating things for better support and faster development. For that unified method of using platform-server, I think first of all the angular.io should write about platform-server as the official document of Angular, the other thing is that would be great if users could simply add support for platform-server simply by using Angular CLI.

The feature request I am asking for is a way to creating or adding support for platform-server using Angular CLI

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
glebmachinecommented, Aug 21, 2017

Yeah, i’m waiting about a half year, for universal support from the box. I don’t understand why so demanded functionality is still ignoring by core team

1reaction
pabl-o-cecommented, Sep 8, 2017

@hansl I follow the universal-rendering.md step by step… but when I build the project I get and error of following the step 3 Step 3: Create a new project in .angular-cli.json The error show me that when I add in the app array of angular-cli.json the server config when I remove this there is no problem

Error output

InvalidConfigError: Parsing ‘/website/.angular-cli.json’ failed. Ensure the file is valid JSON.

Version

"dependencies": {
    "@angular/animations": "^4.2.4",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "core-js": "^2.4.1",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.3.2",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@angular/platform-server": "^4.2.4",
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-side rendering (SSR) with Angular Universal
This guide describes Angular Universal, a technology that renders Angular applications on the server. A normal Angular application executes in the browser, ...
Read more >
How to build an Angular App with Server-Side Rendering
To implement server side rendering in your Angular application, you can use the Angular Universal package. Angular Universal. Create new Angular project: ng...
Read more >
Angular Universal: Complete Practical Guide
This post will be a complete practical guide for getting started with Angular Universal. We are going to go start with an existing...
Read more >
Server-Side Rendering (SSR) Made Easy With Angular ...
See how to use Angular Schematic to easily perform Server-Side Rendering for improved SEO and page speed for smaller devices.
Read more >
How To Use Angular Universal for Server Side Rendering
With Angular Universal, the server will pre-render pages and show your users something, while the client-side app loads in the background.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found