2

I want to render multiple dropdowns in angular based on the result from api. From the api 2 dropdown controls are returned with different data however my code shows same data for both of the controls

Can anyone suggest how to assign a dynamic value to the property "list" in the input element?. I think if that is possible my problem would be solved or please let me know if there is any other solution

1
  • <input id="{{cntrl.id}}" list="cntrl.itemListType"/> i mean the list property in the input tag. Can we assign a value to it at run time like id Commented May 8, 2020 at 10:09

1 Answer 1

1

As list is an input attribute not a property, you can assign dynamic value to list using:

[attr.list] ='object.property'.

for more info see the issue

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.