angular spinner while loading page code example
Example: show loading spinner while page loads angularjs
<body ng-app="MyApp" ng-controller="MyCtrl">
<div>
<button class="btn" ng-click="load()">Load Tweets</button>
<img id="spinner" ng-src="img/spinner.gif" style="display:none;">
</div>
<div>
<ul ng-repeat="tweet in tweets">
<li>
<img ng-src="{{tweet.profile_image_url}}" alt="">
{{tweet.from_user}}
{{tweet.text}}
</li>
</ul>
</div>
</body>