Currently, I am developing a mobile app using Ionic and I am in need of a popup window to collect two pieces of data - a username and a password. After researching several websites, I was unable to find a solution that addressed collecting two pieces of data in a popup window. Additionally, I would like the popup window to have a purple background color. Can anyone guide me on how to achieve this?
$scope.create = function() {
$scope.data = {};
// Creating a customized popup
var myPopup = $ionicPopup.show({
template: '<input type="password" ng-model="data.one">',
style: 'background-color:purple;',
title: 'Enter Wi-Fi Password',
scope: $scope,
buttons: [
{ text: 'Cancel' },
{
text: '<b>Save</b>',
type: 'button-balanced',
onTap: function(e) {
if ((!$scope.data.one)&&(!$scope.data.two)) {
e.preventDefault();
} else {
return $scope.data;
}
}
}
]
});
}