-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: cdk/bidifeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Feature Description
It would be great if we can have a dir
signal.
Currently, to convert into a proper signal I have to do use toSignal
in ngOnInit
.
ngOnInit(): void {
runInInjectionContext(this.injector, () => {
this.direction = toSignal<Direction, Direction>(this.dir.change.pipe(map(() => this.dir.value)), { initialValue: this.dir.value });
});
}
Use Case
I want to be able to determine dir value as well as re-calculating stuff when dir changes, a combination of dir.value
and dir.changes
, a dir()
signal inside effect()
is needed.
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: cdk/bidifeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix