Amit Agarwal
Amit Agarwal

Reputation: 77

Why does option tag in select is not working after migrating from Angularjs 1.3 to 1.8 version?

I have been working on AngularJs 1.3 and the below code is working fine in 1.3 version but after migrating the Angularjs version to 1.8.2, the below code is not working as expected.

     <select class="form-control"  ng-model="formElement.params.customProperties['' + tabProperty.id]" >
        <option style = "color : #2C2C2C" value="">Default</option>
        <option style = "color : #3D5DFF" value = "attention-neutral-1-500">Blue</option>
        <option style = "color : #A35C00" value = "attention-warning-500">Brown</option>
        <option style = "color : #707070" value = "attention-neutral-2-500">Gray</option>
        <option style = "color : #008060" value = "attention-positive-500">Green</option>
        <option style = "color : #9C41DD" value = "attention-system-500">Purple</option>
        <option style = "color : #DC0C22" value = "attention-negative-500">Red</option>
</select>

I have a button named as "close" after this dropdown and this dropdown is inside a popup.

AngularJS 1.3 --> After selecting any value in dropdown, then clicking on close button, there persist the selected value (i.e. after again opening the popup the previously selected value is selected in dropdown).

AngularJS 1.8 --> After selecting any value in dropdown, then clicking on close button, the selected value is not persisted (i.e. after again opening the popup the previously selected value is not selected in dropdown).

Note: There is no any change in controller side as well.

Can anyone please help me what I am missing here or there is any major changes in select-option in Angularjs 1.8 version?

Upvotes: 0

Views: 31

Answers (0)

Related Questions