bloomreach / spa-sdk

Apache License 2.0
15 stars 16 forks source link

[stateKey]="false" not working with Angular 17 (using ssr) and @bloomreach 22.0.2 #29

Closed TimoPot closed 1 month ago

TimoPot commented 7 months ago

[stateKey]="false" mentioned on https://www.npmjs.com/package/@bloomreach/ng-sdk#state-transfering

does not work. The state is still transfered (present in the html)

Using. Angular 17 with SSR and @Bloomreach v20.0.0 and v22.0.2 (both goes wrong)

removing [stateKey]="false" has no effect.

TimoPot commented 4 months ago

Still broken

beetlerom commented 1 month ago

@TimoPot Angular17 was not officially supported until now, but we have recently released support for it. Do you mind sharing if you are still running into this issue? Thanks!

mehrjouei commented 1 month ago

@TimoPot Since Angular 17 has its own built-in SSR, we no longer use Universal for server-side rendering in version 23.3.0. The [stateKey] Input in ng-sdk is deprecated. To turn off SSR, you can uninstall @angular/ssr and remove all related files, like server.ts, from your Angular 17 project.

TimoPot commented 1 month ago

Oh wow. We are not going to remove SSR because we are using SSR to deliver our pages. We need SSR to fetch the resourceapi.

But if you're saying that the [stateKey] is deprecated then we have to come up with another solution to remove the state from the HTML.

I also don't understand why youre saying that we could turn off SSR. That is up to the customer. We are one of the BR users and we have decided to use SSR for good reasons.

mehrjouei commented 1 month ago

I don't mean you should turn off SSR. In Angular 17, your project manages state and SSR directly. To apply any changes regarding them, you handle it within your project.