SiDirectionality Service documentation¶
Provider for dynamic CDK directionality.
CDK per default evaluates directionality once during initialization. This is a problem when switching language later in the lifecycle. This provider can be used to make this dynamic. To use, simply provide this in the ApplicationConfig
:
import { Directionality } from '@angular/cdk/bidi';
import { SiDirectionality } from '@siemens/element-ng/localization';
...
export const APP_CONFIG: ApplicationConfig = {
providers: [
{ provide: Directionality, useClass: SiDirectionality },
...
]
}
bootstrapApplication(AppComponent, APP_CONFIG)
...
Attributes and Methods¶
Name | Type | Default | Description |
---|---|---|---|
(readonly) change ¶ | EventEmitter <Direction > | ... | Stream that emits whenever the 'ltr' / 'rtl' state changes. |
(readonly) value ¶ | Direction | The current 'ltr' or 'rtl' value. | |
(readonly) valueSignal ¶ | WritableSignal <Direction > | 'ltr' |
Types Documentation¶
No types to document for items on this page.
Except where otherwise noted, content on this site is licensed under MIT License.