I have the following code:
<div class="fa-bar">
<i data-ng-show="pLoading.length == 0" class="fa fa-bars"></i>
<i data-ng-show="pLoading.length != 0" class="fa fa-spin fa-spinner"></i>
<span>Admin</span>
</div>
When the loading.length is 0 then I show some horizontal bars, when it changes to be non zero it changes to a spinner.
The code works but for a short time I see a brief flash where neither icon show. At that time the word Admin moves to the left.
Is there a way I could make it so the Admin word always stays in the same position even for that short time when no icon is being displayed. Also is there an alternative that would be better than my using two <i>
elements and two ng-show?