I am sure this is a simple answer but I just cannot seem to solve it.
I have a dropdown list with names in it John, Jack, Jill, etc. I have a second List with professions in Builder, Joiner, Plasterer, etc.
What I am trying to do is when I select John, I know based on his data he is a Builder, so in my second list I want to change the selected value from "select" to "Builder".
Below is a plunker with what I currently have, any advise on how to make this would would be great.
This is my change method for my first dropdown but I am not getting the desired result:
firstDropDownChanged(val: any) {
console.log(val);
if (val.profession == "Builder") {
this._values2.selected = "Builder";
}
else if (val.profession == "Plumber") {
this._values2.selected = "Plumber";
}
else if (val.profession == "Plasterer") {
this._values2.selected ="Plasterer";
}
else if (val.profession == "Joiner") {
this._values2.selected ="Joiner";
}
Thanks Andy