-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to incorporate Angular Universal? #576
Comments
well, I got it working. Using the universal-starter as an offset, I created a seperate webpack config for the server build. Important notes:
__declare is undefined.
To run, you'd then have two terminals open, one doing "watch" to rebuild, and one running nodemon to run/restart the server I dont have the expertise to make it one single webpack config. |
Would be happy to see that also as I've not been very successful so far to integrate Universal with this starter. Especially, importing "angular2-universal/polyfills" introduces some unexplainable bugs in my project. |
My webpack-universal.json, placed in the config directory.
I added the function checkNodeImport to helpers.js
And removed noEmitHelpers:true from tsconfig.json
|
Thanks, there was indeed a glitch in my webpack config. Now I get a new error "No Directive annotation found on App" ("App" being my top class-component quite similar to this). Not sure whether it's because I'm using the new router (not yet supported by Angular Universal) or anything else. |
I agree this should be a main feature because the project is so awesome its a shame it doesn't ship with it as its a must have these days. I'm going to add the files @asgerjensen pasted above and see if i can get it to work. |
Any updates on this? This is basically the must have feature in modern javascript web apps. It should be included and configured. @joeLloyd Hi, did you manage to get it to work? |
@vadimsg I haven't had the chance. I decided to build the whole thing from scratch without this repo until I understand angular2 better. Then I will revisit this repo |
+1 |
Got this running via @asgerjensen script, however the server throws huge memory errors and crashes if you inline your scss files in the components. Why is this so hard? Can't wait for a documented solution. |
+1 |
+1 definetely |
@asgerjensen Could you place your project on branch? I am trying to marge universal-starter with this project, but I am doing something wrong... :) |
+1 |
I can certainly try. I'll have to exfiltrate the setup from my app though. And, full disclosure, it was made back in rc.0 or 1, so I'm not sure it works with the rc4 router; so maybe don't hold your breath. Sent from my iPhone
|
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
I've found this repository that have starter project with Universal on board. This project is very different with current repository but it probably could help to make working config here. |
+1 |
1 similar comment
+1 |
PR added to showcase how it can be done. Note: due to deps from angular/universal, this only seems to work for node version 6 and over. |
👎 #1165 |
There's another example repo at https://github.com/nglibs/universal-example-app showcasing both Universal and lean Angular on a single project - using node.js + express. This application uses Furthermore, it covers most of the features of angular2-webpack-starter by AngularClass such as async/lazy routes, SCSS compilation (both inline and external), dev/prod modes, AoT compilation via I know it's not perfect, might contain issues, and I'm not suggesting that it's a starter/seed project. However, it might help with the use of platform-server. Also hope that angular2-webpack-starter and its community can benefit from at least a small set of its features. Meantime, any help & contributions are welcome :) |
I started using this repo for my project but unfortunately I have to leave this project, just because of unavailability of Angular Universal. How can this be missed? |
@satya-jugran Check out my boiler plate: https://github.com/maciejtreder/angular-universal-serverless It includes server side rendering, PWA support (with pushes), can be deployed on Serverless environment (ie AWS Lambda) and much more! |
@satya-jugran you can always do a pull request adding that functionality. |
[ ] bug report
[ ] feature request
[X] question about the decisions made in the repository
Are there any plans to incorporate Angular Universal? For me (and I assume for many others), this is a coveted feature. Perhaps there's a way to replace the http-server with this express server setup?
If there is no intent to include Universal, then maybe someone (more knowledgable than myself) could write a wiki on it? I'll be making an attempt in the next few weeks. If I happen to figure it out by then, I'll be happy to write one.
The text was updated successfully, but these errors were encountered: