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

How I get the value with prefix? #686

Closed
sbeka opened this issue Feb 14, 2020 · 4 comments
Closed

How I get the value with prefix? #686

sbeka opened this issue Feb 14, 2020 · 4 comments

Comments

@sbeka
Copy link

sbeka commented Feb 14, 2020

How can I get the value along with the prefix?

For example:
<input prefix="+7 (7" mask="00) 000-00-00">

i get value without +7(7

i need value with prefix. Please help!

@ABaranchugov
Copy link

ABaranchugov commented May 1, 2020

I use a crutch:
control.valueChanges .pipe( debounceTime(500) ) .subscribe((value: string) => value = prefix + value + suffix; this.control.setValue( value, { onlySelf: true, emitEvent: false, emitModelToViewChange: false, emitViewToModelChange: false } ); );

NepipenkoIgor pushed a commit that referenced this issue Nov 24, 2020
NepipenkoIgor added a commit that referenced this issue Nov 24, 2020
…#830)

* fix: dropSpecialCharacters false also should return prefix [ref:#686]

* fix: linting errors [ref:#686]

Co-authored-by: Igor Nepipenko <[email protected]>
@NepipenkoIgor
Copy link
Collaborator

@ABaranchugov @sbeka Hi. Thank you got using ngx-mask. Please try version 11.1.2 . Now you [dropSpecialCharacters]=false not skip prefix

@NeoSimvolist
Copy link

what about suffix? i need the same for it

@varundhariyal
Copy link

what about suffix? i need the same for it

+1

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

5 participants