Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't bind to 'options' since it isn't a known property of 'input' #198

Open
jimkeecn opened this issue Jun 23, 2024 · 3 comments
Open

Can't bind to 'options' since it isn't a known property of 'input' #198

jimkeecn opened this issue Jun 23, 2024 · 3 comments

Comments

@jimkeecn
Copy link

jimkeecn commented Jun 23, 2024

<mat-form-field> <mat-label>DRP</mat-label> <input matInput formControlName="drp" autocomplete="off" currencyMask [options]="{prefix: '', suffix: '% ', decimal: '.' }" min="0" max="100"> <mat-error *ngIf="drpForm.get('drp').status == 'INVALID'"> DRP(0% - 100%) </mat-error> </mat-form-field>

I have recently upgrade my project from angular 15 to 16 and update this ngx-currency to 4.0.0 version.
However, while im trying to build this application. it throws error as title. and it only occurs to one of the pages that using currencyMask. other page seems fine.
the only particular for this page that it is used by MatDialog.

@ArtemDintecom
Copy link
Contributor

@jimkeecn I will assume that you deleted the non-existent NgxCurrencyModule, and forgot to import NgxCurrencyDirective.

@jimkeecn
Copy link
Author

@jimkeecn I will assume that you deleted the non-existent NgxCurrencyModule, and forgot to import NgxCurrencyDirective.

Do you mean Import like as documentation?

`import { NgxCurrencyDirective } from "ngx-currency";

@component({
standalone: true,
selector: "app-root",
templateUrl: "./app.component.html",
imports: [NgxCurrencyDirective],
})`

However, My component is not a standalone component. I cannot change that component to a standalone component.

@ArtemDintecom
Copy link
Contributor

@jimkeecn No, I mean import NgxCurrencyDirective into your dialog or page module, not into the AppModule, for sure they are different modules. You don't need to change your component to standalone for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants