How to vary `<options>` in `<select>` elements in AngularJS Forms

Ask a question+

I am working on something which requires to come up with different options for different selections as a list in forms.

For example: If I select DR9 in the System field, it has to show only 100,400,500 clients. Same for QR9 - only 400 and 500.

But in my case, it’s showing(100,400,500,400,500) repetitively.

Here is my code.

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<!DOCTYPE html>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>

    <div ng-app="">
        Password Reset
        <select ng-model="myVar">
            <option value = "DR9">DR9</option>
            <option value = "QR9">QR9</option>
            <option value = "PR3">PR3</option>
            <div ng-switch="myVar">
                <div ng-switch-when="DR9">
                <div ng-switch-when="QR9">
add comment

0 Answer

Your Answer