Comments (11)
same happens on button clicks with latest webpack version. I can click on any button, but after loading the app, nothing is propagated.
from universal-starter.
There are two separate issues here.
@gdi2290 I may be wrong, but it looks like we are not using preboot with the universal-starter. Shouldn't we be passing in preboot: true
here:
https://github.com/angular/universal-starter/blob/master/src/server.ts#L16
The second issue, however, is that even after getting this working, there is a potential issue with components trying to use an input value during the client side initial render. Let's do this. first, Patrick, let's get the renderToStringWithPreboot working (i.e. passing in the option to ng2engine) and then we can discuss the secondary problem.
from universal-starter.
@jeffwhelpley thanks for your reply. the preboot flag is set to true on the server.ts file (L:31) https://github.com/angular/universal-starter/blob/master/src/server.ts. I'm using the angular Class example provided here => https://github.com/angular/universal-starter (webpack version). thanks a lot for your work on this!
from universal-starter.
can you try latest?
from universal-starter.
Hi @gdi2290
thanks for your action on this issue! I can't get a working example on angular-universal-preview 0.70.7.
what I've tried:
- started web app
- toggled network to DLS (2Mb/s)
- changed "Angular" in the input to "random"
- waited till load completed
expectation: text over the input should be "random"
result: my input was overwritten to "Angular2" and the title above did not changed.
setup: node 5.6.0, npm 3.6.0, branch on master
thanks again for you help.
from universal-starter.
preboot was set to false can you change it back c6995a7
from universal-starter.
Thanks for your quick reply.
With preboot set to true to only thing that changes is, that at the end of the loading cycle my input value is still the entered one. but the title does not update.
from universal-starter.
I added a feature to provide server only components so I made a Title directive that replaces the initial title value
https://github.com/angular/universal-starter/blob/master/src/server-only-app/server-only-app.ts#L3...L9
you may want to delete it
from universal-starter.
Hi Patrick
I think you've misunderstood me. With "title" I meant the binded value right above the input test "Hello, Angular2!". This should update to the input value, right? It does, but not if you change something during the load cycle. What I expect here is this:
- I type something in the input
- load cycle completes
- preboot updates "Hello, XXXX" to what I've typed in the input
Thanks again.
from universal-starter.
With angular2 beta 11 and universal preview 0.82.1 can I confirm, that preboot works as expected. thank you very much for that!
from universal-starter.
@zanettin thanks for checking. I'll close this unless someone feels there is still an issue please reopen it
from universal-starter.
Related Issues (20)
- common error interceptor kills node
- Configure Lazy load for prerender
- Move emitDecoratorMetadata to tsconfig.app.json
- angular.json server configurations should include optimization and sourceMap
- Show how to use multiple environments (for browser and prerender) HOT 4
- Lack of API support in angular universal v7? HOT 2
- How to setup nested router-outlet? HOT 1
- core.js init
- How to avoid re-rendering content inside isPlatformServer in the browser HOT 2
- main.js file in dist incorrectly referenced
- serve prerendered files with an express app instead of http-server
- ERROR ReferenceError: gtag is not defined when running npm run build:prerender HOT 2
- Prerendering Broken HOT 1
- Page rendered both from server and browser HOT 1
- get data from any server php
- Is there any way of doing a post request WITHOUT javascript ?
- How deploy Angular Universal with Azure CDN?
- Cannot find module @angular/core
- bug in docs v6 angular @NgModule?
- bug in docs v6 angular --app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universal-starter.