同じフォームフィールドの別の選択に基づいてフォーム構造に基づいてフィールドを隠すことはほとんどありません。ここで、フォームは、ループ(NGリピート)を使用して、ユーザからの入力に基づいて生成され、ハードコードされていません。上記画像における角度jsを使用してドロップダウンで選択した入力に基づいてフォームのフィールドを非表示
データソースはS3として選択された場合、以下の2つのフィールドは、表示されてはなりません。 Redshiftとして選択されている場合は、それが表示されます。
<!-- Block Modified to get additional tag details -->
<div ng-repeat="item in metadataGovernance">
<awsui-control-group validation-message="" label="{{item.governance === 'Required' ? displayName(item.tag) + '*' : displayName(item.tag)}}">
<awsui-textfield ng-hide="item.allowedInputs.length>0" name="{{item.tag}}" data-disabled="false" ng-model="item.value"></awsui-textfield>
<select ng-show="item.allowedInputs.length>0" ng-model="item.value" class="awsui-textfield">
<option value="" selected="selected">Choose one</option>
<option ng-repeat="input in item.allowedInputs" value="{{input}}">{{input}}</option>
</select>
<div class="hoverDesc awsui-button-icon awsui-icon question-circle" style="float: right;margin-left: -67px;margin-right: -28px;">
<span class="hoverDescText">{{item.description}}</span>
</div>
</awsui-control-group>
</div>
<!-- End of Block Modified to get additional tag details -->
あなたはそれがどのようにあなたのJSONを表示することができますか? –
あなたはいくつかのより多くのコードを追加することはできますか? –
ng-if/ng-show/hide ng-if = "dataSource == 'Redshift'" –