-
Notifications
You must be signed in to change notification settings - Fork 483
[email protected] not working with TransferStateModule #832
Comments
@MarkPieszak - Looks like the DOM nodes added by TransferState is affecting the ASP.NET engine parsing? |
@MarkPieszak I think with new ASP.Net engine the old TransferStateModule approach that we followed in https://github.com/MarkPieszak/aspnetcore-angular2-universal is also broken transferData is always empty as a result the http requests are being executed twice. Can this please be fixed any time soon? |
Any update on this? Seems like I am the only person using this engine :D |
we're using it too, @naveedahmed1, and looking forward to an update |
@daveriedstra try new upcoming template from asp.net team you wont be disappointed aspnet/JavaScriptServices#1288 (comment) I think Universal team will ultimately retire |
aspnetcore-engine is taking elements out of the document (style, scripts, links) so that .NET can paste the elements where it wishes, the problem is that it's only getting scripts from head, and servertransfersatemodule is appending it's state script to body. Is it that wise to rip appart the dom and recreating it in .NET? From this example it seems risky. |
Fixed in #889 |
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. |
It seems to be a bug.
After upgrading to [email protected] I tried adding ServerTransferStateModule and BrowserTransferStateModule from @angular/platform-server' and @angular/platform-browser respectively. As suggested https://next.angular.io/api/platform-server/ServerTransferStateModule and https://medium.com/@evertonrobertoauler/angular-5-universal-with-transfer-state-using-angular-cli-19fe1e1d352c
But after this change, I am now receiving error
Error: The selector "app-root" did not match any elements
and no markup is generated at server.The text was updated successfully, but these errors were encountered: