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

FormControl String Value #1013

Open
elvispdosreis opened this issue Jan 3, 2022 · 1 comment
Open

FormControl String Value #1013

elvispdosreis opened this issue Jan 3, 2022 · 1 comment

Comments

@elvispdosreis
Copy link

Is it possible that I only receive a simple element in my formcontrol, I tested the add [onAdding] but I keep getting an object, I would like to receive only a string

 "emails": [
    "elvis@yahoo.com",
    {
      "display": "samra@yahoo.com",
      "value": "samra@yahoo.com"
    },
    {
      "display": "allen@yahoo.com",
      "value": "allen@yahoo.com"
    }
  ]
public transform(value: any): Observable<string> {
        return of(value.value);
 }
@Gbuomprisco
Copy link
Owner

Adding [modelAsString] should solve that. Check out the docs

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

2 participants