Open diegoichinose opened 5 years ago
This could literally be solved by simply changing this (line 33 of currency-mask.directive.js):
this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;
To this:
this.elementRef.nativeElement.style.textAlign = this.options ? this.options.align : this.optionsTemplate.align;
I would appreciate the heck out of you if you did this little change in the next update.
Cheers!
Hello, Currently I am having the following error "TypeError: Cannot set property 'align' of undefined" as I run karma test with any components that make use of the CurrencyMaskModule.
I am using Angular 6 and the v5.3.1 of ng2-currency-mask.
The error disappears as I comment line 33 of the currency-mask.directive.js this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;
This issue only appears with ng test but nothing wrong with the ng serve. Any ideas?