angularfy / autonumeric Goto Github PK
View Code? Open in Web Editor NEWAn Angular module that wraps the awesome autoNumeric input formatter library http://autonumeric.org
An Angular module that wraps the awesome autoNumeric input formatter library http://autonumeric.org
In the README.md file the NgModel is misspelled.
Hello,
We are using this control with reactive forms (formControlName). We create a form and pass a value with the form control. Whenever we want to adapt the value through reactive forms by changing the value outside the user interface it doesn't seem to work. Could it be that there is still a problem with reactive forms?
In the code I can see that writeValue receives an object, but nothing is done with it...
writeValue(obj: any): void { if (this.instance) { this.internal = this.instance.getFormatted(); } }
Kind regards,
Peters Stephan
Hi,
It is 2023 and we are updating to Angular 15, but this library is old and we not able to update it.
So is there someone who is still maintaining this package, or should we search for other alternatives ?
Hi,
Using reactive form I'm unable to handle disable status with ngAutonumeric directive.
I added some disabled functionalities to Davide-a11y's stackblitz I found in issue: #2
https://stackblitz.com/edit/angular-fqwruy
While pressing "Disable/Enable fields", the whole form should be disabled.
However it doesn't disable with "Salary"-field.
And I tried a workaround ("Salary html disable property binding"-field) with [disabled] property binding but that isn't work either.
Regards,
Aki Kesulahti
Hi guys,
We actually migratig our library to Angular V10 but we encouter a problem with your library :-/
Compiling TypeScript sources through ngc
ERROR: projects/.../.../node_modules/@angularfy/autonumeric/lib/autonumeric.module.d.ts:7:56 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).
7 static forRoot(userDefaults?: AutonumericOptions): ModuleWithProviders;
It's actually caused by a non compatibility... could you please fixe it ? :-)
thx
Using ngAutonumeric with decimal character ',' in combination with a FormControl:
Details can be checked out here:
https://stackblitz.com/edit/angular-sttvux?file=src/app/app.component.ts
When an input field inside of a reactive form has the autonumeric directive attached,
if the formControl has a default value,
then the input field will not be populated.
Tested in v2.1.0 and it appears to be working but doesn't after upgrading to 3.0.3
Also tested with Angular v 6.x.x and 8.x.x
Stackblitz:
https://stackblitz.com/edit/ng-autonumeric-lj8g5n
Minimal Example: https://stackblitz.com/edit/angular-ic4akf?file=src%2Fapp%2Fapp.module.ts
After patching the form group, getting the form groups value should return the value patched. Instead it returns the previous value (patching twice, does change the value).
I tried to find out, where this delay comes from, but did not succeed.
I was trying to import it but looks like my project is suffering a little bit, it compiles correctly for angular4 but on runtime I get:
Unexpected value 'NgAutonumericModule' imported by the module ...
any suggestion?
Hi,
When I refresh the page (CTRL + R / F5), I get this error in the ngOnDestroy method and my component does not open.
The form value should be updated whenever there's a change to the field
The form value is being updated whenever the user clicks away from the field.
An option in the directive which enables direct changes to the ngModel
A demo of the issue can be found here: Stackblitz
I have a page with just 1 field (this autonumeric field). When the user enters a value, I need to:
Since the ngModel is not updated with changes, from the user, there is no easy way to verify changes.
Current:
<input [ngAutonumeric]="{
currencySymbol: '\u00a0€',
minimumValue: '0'
}" [(ngModel)]="myModel" (format)="onFormat($event)"/>
New:
<input [ngAutonumeric]="{currencySymbol: '\u00a0€', minimumValue: '0'}"
updateOnChanges
[(ngModel)]="myModel" (format)="onFormat($event)"/>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.