Right now I have a view that uses ng-show to show a select
DOM object when certain criteria are met and ng-show for a input
DOM for all other cases. When I do this and switch between the two cases, input
box takes longer to disappear than when the select
appears. The delay is pretty noticeable so I want to improve it so that there's very little delay between the two DOM changes.
Is there any way to do this?
<div>
<input ng-show="field && (type == 'search' || fieldBucket[field].moreBuckets)"
type="text" ng-model="value">
<select class="facet-value"
ng-show="field && type == 'filter' && !fieldBucket[field].moreBuckets"
ng-model="value"
ng-options="fieldBucket[field].buckets">
</select>
</div>