mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Angular-CLI-Based-Template: Angular 5 TransferStateModule doesn't work #297
Closed
opened 2025-08-09 17:15:45 +00:00 by fergalmoran
·
0 comments
No Branch/Tag Specified
master
rybrande/masterToSrc
pakrym/no-console-fb
release/2.2
pakrym/remove-obsole-api-usage
maestro/release/2.2
maestro/master
release/2.1
release/2.0
rybrande/MergeRelease21IntoDev
rel/2.0.0-extensions
angular-animations-example
fix-angular-material-publishing
rel/2.0.0-templates
httpwithstatetransfer-example
rel/2.0.0-preview2-templates
aspnet-webpack-react-2.x
angular4-prerender-data-example
version-1.x
angular2-lazy-loading-example
581-isomorphic-react-cookies-example
example-using-typescript-paths-for-494
v1.0.x
angular2-materialize-example
redux-typed-1-x
primeng-example
font-awesome-example
karma-testing-example
2.2.0
2.2.0-preview3
2.2.0-preview2
2.2.0-preview1
2.1.1
2.1.0
2.0.4
2.1.0-rc1-final
2.1.0-preview2-final
2.0.3
2.1.0-preview1-final
2.0.2
2.0.1
rel/2.0.0
rel/2.0.0-preview2
Labels
Clear labels
2 - Working
2 - Working
3 - Done
3 - Done
3 - Done
3 - Done
3 - Done
3 - Done
3 - Done
angular
angular
angular
angular
angular
bug
bug
bug
bug
bug
bug
bug
bug
bug
core
core
core
core
core
core
core
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
external
external
P1
P1
P1
P1
P1
P1
P2
P2
P2
P2
P2
P2
P2
P2
P2
PRI: 1 - Required
react
react
task
task
up-for-grabs
up-for-grabs
up-for-grabs
waiting
waiting
waiting
waiting
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
fergalmoran
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github/JavaScriptServices#297
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @naveedahmed1 on 12/3/2017
@SteveSandersonMS since the thread about new angular cli based template is too long that its seems very difficult to track each issue, I am opening this issue about Transfer State Module.
Further to our discussion,
Unfortunately, I am still unable to use Transfer State Module with this template. There is a cli based repo https://github.com/Angular-RU/angular-universal-starter , with Transfer State Module which works fine (demo here http://master-ssr.gorniv.com/back). But when we port this code to the .NetCore Angular CLI based template this no longer works and requests are rendered twice once on server and once on client.
You were rite, the &q is not an issue, because when adding transfer state and manually adding below script tag to index.html file, it is able to pick it from markup. So apparently, the issue is when script tag is added to markup.
I am quite sure there is something wrong either with this template or with
aspnet-prerenderingthat prevents TransferState to work properly. There is another module from Universal (TransferHttpCacheModule), that automatically handles the http request caching on server which underneath uses TransferStateModule. Even that module doesn't work with this template. Here is the link to that package https://www.npmjs.com/package/@nguniversal/common@MarkPieszak in one of our conversations in mid Nov, you mentioned about some change in AngularCompilerPlugin, which was preventing TransferState to work with https://github.com/MarkPieszak/aspnetcore-angular2-universal 5.x . Should that issue affect new .Net Core Angular cli based template as well? In our conversation you mentioned: