need to convert persian numbers to english ones in this input <input type="text" formControlName="mobile" myCustomDirective />.
so created a directive, with entering Persian number events fire with that value, then I change it to English number and again all events fire with English one. if I prevent events from firing for the second change it's wrong because I need events fire with English number.
actually, I need to get the value of the input and change it to English before FormControl directive catches it.
is there any solution?
how to change value of input before formControl directive get it in angular
2.2k Views Asked by roya At
1
There are 1 best solutions below
Related Questions in ANGULAR
- Is it possible to use ES5 JavaScript with Angular 2 instead of TypeScript?
- Module '"angular2/angular2"' has no exported member 'For'
- import syntax in typescript creating another js file in visual studio
- Separate ts file for imports
- How to use an AngularJS 2 component multiple times in the same page?
- injectables not working in angular 2.0 latest build 26
- Does angular2 bootstrap have a way to dynamically target elements like it does in angular 1.x
- Import {} from location is not found in VS Code using TypeScript and Angular 2
- Angular 2/Typescript: require not found
- ng-switch in Angular2
- Angular 2 import issue: "Zone already exported on window the object!"
- How to make FileReader work with Angular2?
- Writing the most basic Unit test in Angular 2?
- Angular2: Creating child components programmatically
- AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined
Related Questions in ANGULAR-REACTIVE-FORMS
- How to add an element in nested FormArrays?
- When to use FormGroup vs. FormArray?
- Mutually exclusive options in Angular
- Multiple custom validation in angular 2
- Angular reactive form [disabled] attribute doesn't work for text field based on validity of another text field
- Angular 4 Reactive Forms FormControl errors is null
- Angular2 Reactive forms, FormControl default value in pristine status
- angular4 no validation on cancel
- Angular 4 FormGroup removeControl() does not update the form
- Handling nested data in reactive forms
- ReactiveForms in Angular 2 generate JSON with empty value or empty object for my optional field
- What is the most effective way to approach resetting a reactive angular form?
- ERROR Missing number at position 0 when using setValue angular 4
- Angular 4 ReactiveForms Validation
- Regex for number with or without extension
Related Questions in ANGULAR-DIRECTIVE
- AngularJS directive within ng-if won't run
- How to access wrapped variables in a directive?
- Custom notPattern directive like ngPattern, but checking whether a RegExp does not match
- How to mock angular directive that has require field
- scope.$watch not working in angular directive
- angular forms validation issues when using plugins
- ng-repeat sorting arrow not working in javascript datatables
- Why does the if and else both get executed on scroll?
- AngularJS use a directive inside a ng-repeat
- Angular pagination, set first page via the controller
- angularjs: multiple binded functions in directive
- Can't bind to 'ngModel' since it isn't a known property of 'input' during two way data binding in Angular 2
- combo box directive not triggered
- Getting ng-class to work
- angular2 - Execute template statement from directive
Related Questions in FORM-CONTROL
- In Visual Studio 2013 when I add an existing form then controls don't appear on designer
- C# Windows Form Application - value not printing in textbox for each time
- TypeError: Cannot set property '$pristine' of undefined
- Strange formArray behavior in Angular2
- Meteor React-Bootstrap: how to set value to FormControl
- show form-control only when value chosen on previous form-control with html and php
- VBA : Assign default value to a form control combo box
- angular material table sort with formControl
- How to use [formControlName] with mat-checkbox
- Async validator and mat-autocomplete not working together
- Returning data to Forms without opening a new instance
- Drop-down Lists with Conditional Data
- React TypeScript 4.9.5 => onChange typesafe error in React Bootstrap FormControl
- Angular FormArray can't bind to my FormControls
- update crud angular formControlName databinding
Related Questions in CONTROLVALUEACCESSOR
- 'No value accessor for form control with name' while creating reusable matInput component with ControlContainer
- Using angular form ControlValueAccessor and mat-autocomplete
- How to use Built-in Angular validator within custom ControlValueAccessor
- Extend ControlValueAccessor with isEmpty function
- Change FormControl value from ControlValueAccessor
- Angular form control validation when using ControlValueAccessor
- Angular input not triggering properly when using onPush
- Knowing a custom form control is invalid and touched inside of the component itself?
- How can I add ngModel custom validator and detect changes in template driven form
- Angular ReactiveForms: ControlValueAccessor validate initial value without notifying change
- Why takeUntilDestroyed(this.destroyRef) in registerOnChange of a ControlValueAccessor generates a "View has already been destroyed"
- Is it possible to specify validators in parent form to override children of custom CVA?
- angular material custom form control component with custom validation doesn't trigger on form submit
- how to change value of input before formControl directive get it in angular
- Angular 12 - ControlValueAccessor and patchValue
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
finally I could resolve my question:
and simply in the form I can use this directive