-
Notifications
You must be signed in to change notification settings - Fork 483
Angular Universal Common Module doesnt work with aspnetcore-engine #835
Comments
I think the issue here is again due to |
Somehow adding ServerTransferStateModule breaks the server-render completely, it's on my radar, just need some time to investigate it further. This is the same issue as #832 |
I've investigated that The issue is related to aspnetcore-engine because it also adds a hook to |
I think aspnetcore-engine would be deprecated soon, the new upcoming template from Microsoft, won't need it. Have a look at aspnet/JavaScriptServices#1288 (comment) |
Possible cause ServerTransferStateModule version 5.1.3 aspnetcore-engine version 35bfc51 on Oct 11, 2017 ServerTransferStateModule.serializeTransferStateFactory() appends to doc.body while aspnetcore-engine only checks in doc.head for scripts. Also maybe a possible race condition using BEFORE_APP_SERIALIZED since ServerTransferStateModule.serializeTransferStateFactory() and aspnetcore-engine's extracting of scripts uses BEFORE_APP_SERIALIZED and to get the state scipt aspnetcore-engine's needs to trigger after ServerTransferStateModule.serializeTransferStateFactory() If a version of renderModuleFactory could return a Domino document that would make aspnetcore-engine not need to use BEFORE_APP_SERIALIZED. I tested that state transfer works in template: |
@devel112 I'm trying also to get this working, and pretty much almost came to you're the conclusion as well. One thing I noticed is that when registering I still dont get exactly why when registering the
Ideally in my opinion, instead of just the HTML it should return the |
@stephenlautier, @devel112 Is the mentioned above modified aspnetcore-engine fixed the issue or not? |
I haven't tried exactly the mentioned solution, but more or less it should work. Ideally, for the .net we return the state as an object instead of embedding it as script and add it to the globals |
@MarkPieszak Proposal: Change strategy from mangling AngularCompiler output to aspnet supplying an index.html file/code that AngularCompiler weaves the app into? |
Fixed in #889 |
Please keep in mind that this won't actually be resolved until the new packages have been published, which should be imminent. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Since the intro page of Angular Universal Common Module says "This is the common Angular Universal module that is common across server-side rendering app irrespective of the rendering engine." I assume it should also work with aspnetcore-engine.
I tried adding it to my aap, but it seems that it doesn't work. Though it doesn't break the app as with that case mentioned in #832 , but the requests are executed twice, once on server and then again on client.
The text was updated successfully, but these errors were encountered: