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

filling ngx-select-ex using enum #151

Open
erickvls opened this issue Mar 14, 2019 · 0 comments
Open

filling ngx-select-ex using enum #151

erickvls opened this issue Mar 14, 2019 · 0 comments

Comments

@erickvls
Copy link

How can i filling my select using enum in my component? I can see my enum with the strings but i cant get the value.

This is my select using enum in html
link.

This is my enum in my component.ts
link

in my component in onInit i have this for fill my select in html
`export class MyComponent{

orientacaoSexual: string[];

ngOnInit(): void {
    var orientacaoSexual = Object.keys(OrientacaoSexual);
    this.orientacaoSexual = orientacaoSexual.slice(orientacaoSexual.length / 2);`

and in my html page i have

<ngx-select (selectionChanges)="parseValue($event.target.value)" placeholder="Selecione o Estado" [items]="orientacaoSexual" optionValueField="orientacaoSexual"></ngx-select>

and when i click in any select option i get this error.
link

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

1 participant