angular / universal

Server-side rendering and Prerendering for Angular
MIT License
4.04k stars 484 forks source link

Rendering would return more HTML on request #701

Closed mariohmol closed 7 years ago

mariohmol commented 7 years ago

http://stackoverflow.com/questions/43613514/angular4-universal-server-side-rending-would-return-more-html-rendered-on-reques

I expect to have some html inside the tags <demo-app></demo-app>

I suppose that this is the current implementation for NgExpress

https://github.com/angular/universal/tree/master/modules/ng-express-engine

So I used `import { ngExpressEngine } from '@nguniversal/express-engine';``

I started my app based on the https://github.com/FrozenPandaz/ng-universal-demo

FrozenPandaz commented 7 years ago

What you posted looks fine. Please use the package published at @nguniversal/express-engine and consider upgrading to @angular 4.0.3, there should be no breaking changes from 4.0.0-rc.5.

I see it working on https://github.com/FrozenPandaz/ng-universal-demo so I feel like its not the package.

mariohmol commented 7 years ago

Thanks for answering! I was following this package json:

Forced to be angular 4.0.3 and same thing..

This link shows import { ngExpressEngine } from '@universal/ng-express-engine';

But shows as cant resolve @universal/ng-express-engine ..

So i'm using the import { ngExpressEngine } from '@nguniversal/express-engine';

mariohmol commented 7 years ago

I did a new fork in this repo and i'm trying to reproduce what i have in mine project there.

I cant remember what i did to make these items to work:

The thing is.. would be nice to have a full project using universal like in a real world.. (a lot of node modules and some for app).. this implies in changes in webpack as well..

mariohmol commented 7 years ago

Could make this work porting my project to this example (https://github.com/clbond/angular-ssr/tree/master/examples/demand-express) .. with translate, server with mongoose and frontend with material.. so far so good =)

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.