aspnetcore-angular-universal icon indicating copy to clipboard operation
aspnetcore-angular-universal copied to clipboard

Two app-root bindings

Open makulatura opened this issue 6 years ago • 6 comments

Hey, I am having troubles with component css - it prerendered, but when angular kicks in, it's gone (other css files, that are loaded directly from view works fine).

First thing I am seeing is two app-root bindings - is this how it should be? After browser kicks in, first app is hidden and for second app - no css gets applied. I don't see this kind of running app structure neither in my own angular v.4.3, nor in a bit older version of this template.

image

I am currently migrating from angular 4.3 --> 6.0.7. Both has SSR enabled (thank you for creating this awesome template).

makulatura avatar Jul 26 '18 14:07 makulatura

I'm also experiencing the same issue. In my case however, during the initial load or on a refresh, the display property stays stuck at none. The page works fine when I disable SSR.

ogvu12 avatar Aug 04 '18 03:08 ogvu12

I am also seeing this phenomenon.

image

daveharmswebdev avatar Aug 10 '18 13:08 daveharmswebdev

The first one is hidden the second one has no CSS.

daveharmswebdev avatar Aug 10 '18 13:08 daveharmswebdev

@daveharmswebdev, @ogvu12 any progress on this? My temporary solution was to comment out PrebootModule module in both app.module files.

makulatura avatar Aug 22 '18 07:08 makulatura

I'm running into this same problem. Based on my testing it looks like the app-root that is displaying is from the server and the other is the browser version. However it's not switching over to the browser and gets stuck with the prerender data as all actions are stopped by the preboot.

This doesn't seem to be problem if the project is built for PROD as everything is working.

Chris3773 avatar Aug 31 '18 03:08 Chris3773

@makulatura Do you by any chance host on Azure and have Application Insights enabled, looks like i'm only having these duplicate app-roots when application insights is enabled

NielsNauwynck avatar Jul 12 '19 12:07 NielsNauwynck