Giter Club home page Giter Club logo

Comments (11)

zanettin avatar zanettin commented on May 23, 2024

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.

jeffwhelpley avatar jeffwhelpley commented on May 23, 2024

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.

zanettin avatar zanettin commented on May 23, 2024

@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.

PatrickJS avatar PatrickJS commented on May 23, 2024

can you try latest?

from universal-starter.

zanettin avatar zanettin commented on May 23, 2024

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.

PatrickJS avatar PatrickJS commented on May 23, 2024

preboot was set to false can you change it back c6995a7

from universal-starter.

zanettin avatar zanettin commented on May 23, 2024

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.

PatrickJS avatar PatrickJS commented on May 23, 2024

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.

zanettin avatar zanettin commented on May 23, 2024

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.

zanettin avatar zanettin commented on May 23, 2024

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.

PatrickJS avatar PatrickJS commented on May 23, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.