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

TypeError: Cannot read property 'apply' of undefined. #125

Open
mirnpnh opened this issue Dec 21, 2018 · 3 comments
Open

TypeError: Cannot read property 'apply' of undefined. #125

mirnpnh opened this issue Dec 21, 2018 · 3 comments

Comments

@mirnpnh
Copy link

mirnpnh commented Dec 21, 2018

Hi,
I have been using your component with angular 7.2 and it works fine except this error which seems to be a simple np error. If you could please include a fix on next release.

ERROR TypeError: Cannot read property 'apply' of undefined
    at CurrencyMaskDirective.push../node_modules/ng2-currency-mask/src/currency-mask.directive.js.CurrencyMaskDirective.handleBlur (currency-mask.directive.js:45)
    at Object.eval [as handleEvent] (xxxx.html:124)
    at handleEvent (core.js:21673)
    at callWithDebugContext (core.js:22767)
    at Object.debugHandleEvent [as handleEvent] (core.js:22470)
    at dispatchEvent (core.js:19122)
    at core.js:19569
    at HTMLInputElement.<anonymous> (platform-browser.js:993)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:16147)
@mirnpnh
Copy link
Author

mirnpnh commented Dec 21, 2018

Also by default even if no validation parameter is set it adds an ng-valid class to the input box which turns the placeholder to green color which isn't looking good to. If you could address this too please :)

@apappasadap
Copy link

Same issue

@tadeueliezer21
Copy link

Hello, @Innomalist
you can try this
first import ngModel in app.module.ts
import { FormsModule } from '@angular/forms'
after
<input pInputText type="text" placeholder="0,00" name="valor" currencyMask [options]="{ prefix: 'R$ ', thousands: '.', decimal: ',', allowNegative: false }" ngModel>

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

3 participants