<html ng-app="ionicApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Ionic Template</title>
<link href="https://code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
<script src="https://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
</head>
<body ng-controller="MyCtrl">
<ion-header-bar class="bar-positive">
<button class="button" ng-click="loadData()">
Load Data!
</button>
<button class="button" ng-click="increaseCounter()">
Increment Counter
</button>
<h1 class="title">{{myTitle}}</h1>
</ion-header-bar>
<ion-content padding="true">
<h2>Content</h2>
<p>Counter : {{counter}}
</ion-content>
</body>
</html>
angular.module('ionicApp', ['ionic'])
.controller('MyCtrl', function($scope, $ionicLoading, $timeout) {
$scope.myTitle = 'Loading Sample';
$scope.loadingIndicator;
$scope.counter = 0;
$scope.increaseCounter = function() {
$scope.counter++;
}
$scope.loadData = function() {
$scope.loadingIndicator = $ionicLoading.show({
template: '<p>This is a LONG loading!</p>'
});
$timeout(function() {
$ionicLoading.hide();
}, 5500);
};
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.