I have two buttons that are using ng-if to determine if they should be shown or not. For a brief second, both elements are shown even though they should not be shown together ever. In isolated examples, this works fine, but in my project it has some latency. Very similar to this post: Angular conditional display using ng-if/ng-show/ng-switch briefly shows both elements but that didn't have any answers that were different than what I tried.
<button class="btn btn-primary drop_shadow" ng-if="vm.ingestReady == true"
ng-click="vm.ingestReady = !vm.ingestReady" ng-cloak> Start Ingest
</button>
<button class="btn btn-danger drop_shadow" ng-if="vm.ingestReady == false"
ng-click="vm.ingestReady = !vm.ingestReady" ng-cloak>Cancel Ingest
</button>
And controller code is
vm.ingestReady = true;
on page load. So clicking the button should just toggle the view, but for a hot second, both are visible.