taiga-family/maskito

๐Ÿž - MaskitPipe in Angular Standalone Component

loneoakdev opened this issue ยท 1 comments

Which package(s) are the source of the bug?

@maskito/angular

Playground Link

https://stackblitz.com/edit/angular-17-starter-project-zlwrjv?file=src%2Fmain.ts

Description

Trying to use MaskitoPipe in an Angular standalone component and following the example found in the sample docs at https://maskito.dev/frameworks/angular#pipe

Adding MaskitoPipe to the imports array on the component results in the following error:
The pipe 'MaskitoPipe' appears in 'imports', but is not standalone and cannot be imported directly. It must be imported via an NgModule.

Tried importing MaskitoModule instead, however, the pipe isn't applied. Tried adding MaskitoPipe to the providers array which also did not work and the pipe isn't applied.

Maskito version

1.9.0

Which browsers have you used?

  • Chrome
  • Firefox
  • Safari
  • Edge

Which operating systems have you used?

  • macOS
  • Windows
  • Linux
  • iOS
  • Android

Hello there. Maskito 2.0 is not yet released, sorry for this misalignment with docs and code. We will release it soon, with 1.x versions you need to import MaskitoModule as it does not yet have standalone directives.