Giter VIP home page Giter VIP logo

Comments (11)

jeffwhelpley avatar jeffwhelpley commented on May 10, 2024 1

Oh, weird. Haven't seen this one before. I will look into this and get back to you. Thanks for reporting.

from universal-starter.

jeffwhelpley avatar jeffwhelpley commented on May 10, 2024

@cristinecula are you setting any preboot options? Did you literally just change the option to true and that was it or are there other differences with your code and the latest repo code?

from universal-starter.

cristinecula avatar cristinecula commented on May 10, 2024

@jeffwhelpley this is the output of git diff

diff --git a/src/server.ts b/src/server.ts
index 03d93de..b0fa803 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -42,7 +42,7 @@ function ngApp(req, res) {
       NODE_HTTP_PROVIDERS,
     ],
     async: true,
-    preboot: false
+    preboot: true
   });
 }

(END)

from universal-starter.

PatrickJS avatar PatrickJS commented on May 10, 2024

@cristinecula can you change the value to preboot: { appRoot: 'app' }

from universal-starter.

cristinecula avatar cristinecula commented on May 10, 2024

@gdi2290 that does the trick :)
Thank you 👍

from universal-starter.

Kunepro avatar Kunepro commented on May 10, 2024

To me it's not working at all.

Cloned repo.
npm install
I change this and only this (it's a fresh install):
preboot: false
TO:
preboot: { appRoot: 'app' }

npm run build
npm start

I open localhost:3000 on Google Chrome Version 50.0.2661.86 (64-bit)
I see the page.
I open dev tools.
Network -> throttle 4G for delay.
Empty Cache & hard reload.
I type some random letters in the "Two-way binding: [this input field]".
"Universal JavaScript ftw!" doesn't change until the page finish to load.
Page finishes to load and "Universal JavaScript ftw!" remains the same while the input field gets reset to default "ftw", I expected the opposite to happen!
What I'm doing wrong?

from universal-starter.

jeffwhelpley avatar jeffwhelpley commented on May 10, 2024

@Kunepro I just tried this out again with the latest and it does work for me. In client.ts try to change the bootstrap to:

setTimeout(function () {
  bootstrap(App, [
    ...BROWSER_ROUTER_PROVIDERS,
    ...BROWSER_HTTP_PROVIDERS
  ]);
}, 3000);

Then test again. This obviously should do the same thing as network throttling, but just curious to see if you see different results. Let me know either way.

from universal-starter.

Kunepro avatar Kunepro commented on May 10, 2024

Hi @jeffwhelpley , nice to meet you, expecially after watching your conferences!
If I load the page from localhost with your code it looks like it works,
I edit the input field, and after the 3 seconds the string gets updated.
However, I hate to bring bad news, but when using developer's tools and network throttling the issue persists. (your code is still there)
I tested this 5 more times to don't come with false results.
Last time I checked that cache is disabled in dev tools setting, and also in dev tools networking tab, plus I deleted all history and caching from chrome.
I open a new tab, open dev tools, throttling to regular 3G, server side page loads instantly, I type some random letters in the input fields, but after the page has loaded the input field is back to "ftw" and also the "Universal JavaScript ftw!" is still like default. :(

My node is: v5.10.1
npm: 3.8.3
I don't think my computer spec may help, however:
OS X El Capitan 10.11.4

debugger:
Type: connect
V8-Version: 5.0.71.35
Protocol-Version: 1
Embedding-Host: node v6.1.0
Content-Length: 0

from universal-starter.

jeffwhelpley avatar jeffwhelpley commented on May 10, 2024

@Kunepro ahhhhh....I see the issue. hey, @gdi2290 so it looks like the express engine is currently pulling in preboot as an external file. We need to make this inline. Let's discuss at our meeting today.

@Kunepro I will post here when we are able to get this change in, but if this is a blocker for you and you are adventurous, the workaround for this is to override the express engine and have the generated preboot code inserted directly into your index.html on the server side. I recommend you wait until we get the fix in, but just wanted to let you know in case you needed a solution ASAP.

from universal-starter.

Kunepro avatar Kunepro commented on May 10, 2024

Hi @jeffwhelpley , thank you for the help.
I'm still working on the client, I can wait the official fix for the server, I'm just glad to know that it will be fixed!

from universal-starter.

jeffwhelpley avatar jeffwhelpley commented on May 10, 2024

Try the latest and let me know.

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.