Home > Enterprise >  How to use csv data to support dependent drop down in Angular
How to use csv data to support dependent drop down in Angular

Time:05-05

Consider there are 3 drop down by Angular,

Name  |   Address |  Social-SSN

in the back end there is a csv file with same structure, each row represent dependent options for each job down.

for example

"Mary", "123 Fairyland", "123-45-6789"

Whenever user choose "Mary" from drop down name, or "123 Fairyland" from dropdown Address or or "123-45-6789" from dropdown Social-SSN , the value for the other two columns should automatically pop up based on the corresponding row value in the csv.

This post is not lazy guy asking for exact implementation, but look for guidance of the solution. I am not Angular Guru so don't know where to start.

CodePudding user response:

As the data allways has the same index, you can use that to set the selected index on the other dropdowns.

Here is a very basic angular app with html select to get u started: stackblitz

  • Related