http://forum.ionicframework.com/t/ionic-alertbox-issue/2165
A Pen by Justin Noel on CodePen.
<html ng-app="ionic.example"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Popups</title> | |
<!-- Sets initial viewport load and disables zooming --> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet"> | |
<script src="http://code.ionicframework.com/nightly/js/ionic.bundle.js"></script> | |
</head> | |
<body ng-controller="PopupCtrl"> | |
<button class="button button-dark" ng-click="showAlert()">Sample Alert</button> | |
<script id="popup-template.html" type="text/ng-template"> | |
<input ng-model="data.wifi" type="text" placeholder="Password"> | |
</script> | |
</body> | |
</html> |
angular.module('ionic.example', ['ionic']) | |
.controller('PopupCtrl', function($scope, $timeout, $q, $ionicPopup) { | |
$scope.showAlert = function() { | |
$ionicPopup.alert({ | |
title: 'Success', | |
content: 'Hello World!!!' | |
}).then(function(res) { | |
console.log('Test Alert Box'); | |
}); | |
}; | |
}); |