inject inlinePrebootCode in HEAD? or immediately after appRoot
See original GitHub issue- I’m submitting a …
- bug report
- Which parts of preboot are affected by this issue?
- server side
- inline
According to the README:
You then inject inlinePrebootCode into the HEAD section of your server-side template.
But that doesn’t work, at least, in the following cases:
- With Angular 2x auto bootstrap (using
ng-app
ordata-ng-app
attr on your app root), this inline script seems to only work at the very end of the<body>
(presumably because Angular waits for DOM ready event before executing)- in other words, the
waitUntilReady
must not (even with setTimeout of 1) be getting executed fast enough
- in other words, the
- With Angular 4x, where Angular’s
bootstrapModule
code can happen before DOM ready event, then this inline script only works when immediately after the app root.
So I’m proposing, assuming someone can corroborate, that the guidance be changed to insert the “inlinePrebootCode” immediately after the app root element (so it works in most (all?) cases)
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
preboot - npm
Inline - This is the code that is injected into the HEAD of your server view and is in charge of recording all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, @jotto. I will have a major refactor of preboot that will work better with v4 shortly. Stay tuned.
@chrisnassouri sorry about the delay. work projects have been eating into my fun open source time 😉 I will get something out for this by next week.