Skip to content

feat(COMPONENT): BidiModule dir signal #29488

@MurhafSousli

Description

@MurhafSousli

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

No one assigned

    Labels

    P4A 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 fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions