Hi.
I'm working on some AngularJS 1.5.8 code.
I'm finding that in the many variations on this theme I've tried:
<li>
<select ng-disabled="vm.targetPipelines.length == 0"
class="css-label css-input text-center build-sidebar-btn"
ng-model="vm.targetPipeline"
ng-options="pipeline as pipeline.name for pipeline in vm.targetPipelines"
ng-change="vm.LoadProductVariants()"
name="name"
required>
<option value="">Select a Pipeline</option>
</select>
</li>
<li>
<select ng-disabled="vm.targetVariants.length == 0"
class="css-label css-input text-center build-sidebar-btn"
ng-model="vm.targetVariant"
ng-options="variant as variant.name for variant in vm.targetVariants"
name="variantname"
required>
<option value="">Select a Variant</option>
</select>
</li>
...the first, pipeline-related select box initially says "Select a Pipeline". But the second, variant-related select box does NOT initially say "Select a Variant". I want them both to have their "Select a ..." text initially, and can't seem to get the second to have it, even though the first works fine.
Instead of saying "Select a Variant", it consistently has one of two things, depending on which of the many behind-the-scenes incantations I've tried. It's always either totally empty, or it has the first (and currently only) option preselected. I don't want either of those behaviors.
Any suggestions?
Thanks for reading, and hopefully, answering!