taiga-family / taiga-ui

Angular UI Kit and components library for awesome people
https://taiga-ui.dev
Apache License 2.0
3.15k stars 424 forks source link

🐞 - Top level `tuiMode` is not accessible in lazy routes #5168

Open constantant opened 1 year ago

constantant commented 1 year ago

Playground Link

https://stackblitz.com/edit/angular-ireadt?file=src%2Fapp%2Flazy-loaded-module%2Fbusiness.service.ts

Description

mode-di

Angular version

14

Taiga UI version

3.41.1

Which browsers have you used?

Which operating systems have you used?

splincode commented 11 months ago

https://github.com/taiga-family/taiga-ui/pull/5275

waterplea commented 11 months ago

It is reproducible on the stackblitz above though. Let's keep it open and come back to it in 4.0 RCs, once we update Angular to 14.

constantant commented 11 months ago

Then we should give a workaround here: simply provide the needed services in a Component instead of a Module

https://stackblitz.com/edit/angular-ireadt-ka1goi?file=src%2Fapp%2Flazy-loaded-module%2Fpage.component.ts