Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myPopup = $ionicPopup.show({
- template: '<input type="password" ng-model="data.wifi">',
- title: 'Enter Wi-Fi Password',
- subTitle: 'Please use normal things',
- scope: $scope,
- buttons: [
- { text: 'Cancel' },
- {
- text: '<b>Save</b>',
- type: 'button-positive',
- onTap: function(e) {
- if (!$scope.data.wifi) {
- //don't allow the user to close unless he enters wifi password
- e.preventDefault();
- } else {
- return $scope.data.wifi;
- }
- }
- }
- ]
- });
- myPopup.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement