Skip to content

Commit

Permalink
Merge pull request #4017 from adam-back/patch-1
Browse files Browse the repository at this point in the history
docs(popup): increased js readability
  • Loading branch information
mlynch committed Dec 6, 2015
2 parents 6f1d20a + 08ed8b5 commit 3857ec9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/angular/service/popup.js
Expand Up @@ -43,7 +43,7 @@ var POPUP_TPL =
*
* // Triggered on a button click, or some other target
* $scope.showPopup = function() {
* $scope.data = {}
* $scope.data = {};
*
* // An elaborate, custom popup
* var myPopup = $ionicPopup.show({
Expand All @@ -67,19 +67,23 @@ var POPUP_TPL =
* }
* ]
* });
*
* myPopup.then(function(res) {
* console.log('Tapped!', res);
* });
*
* $timeout(function() {
* myPopup.close(); //close the popup after 3 seconds for some reason
* }, 3000);
* };
*
* // A confirm dialog
* $scope.showConfirm = function() {
* var confirmPopup = $ionicPopup.confirm({
* title: 'Consume Ice Cream',
* template: 'Are you sure you want to eat this ice cream?'
* });
*
* confirmPopup.then(function(res) {
* if(res) {
* console.log('You are sure');
Expand All @@ -95,6 +99,7 @@ var POPUP_TPL =
* title: 'Don\'t eat that!',
* template: 'It might taste good'
* });
*
* alertPopup.then(function(res) {
* console.log('Thank you for not eating my delicious ice cream cone');
* });
Expand Down

0 comments on commit 3857ec9

Please sign in to comment.