diff --git a/js/angular/service/popup.js b/js/angular/service/popup.js
index d97b18afb64..1cbeb70b0b8 100644
--- a/js/angular/service/popup.js
+++ b/js/angular/service/popup.js
@@ -251,8 +251,10 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
* cssClass: '', // String, The custom CSS class name
* subTitle: '', // String (optional). The sub-title of the popup.
* template: '', // String (optional). The html template to place in the popup body.
- * templateUrl: '', // String (optional). The URL of an html template to place in the popup body.
+ * templateUrl: '', // String (optional). The URL of an html template to place in the popup body.
* inputType: // String (default: 'text'). The type of input to use
+ * defaultText: // String (default: ''). The initial value placed into the input.
+ * maxLength: // Integer (default: null). Specify a maxlength attribute for the input.
* inputPlaceholder: // String (default: ''). A placeholder to use for the input.
* cancelText: // String (default: 'Cancel'. The text of the Cancel button.
* cancelType: // String (default: 'button-default'). The type of the Cancel button.
@@ -464,14 +466,21 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
function showPrompt(opts) {
var scope = $rootScope.$new(true);
scope.data = {};
+ scope.data.fieldtype = opts.inputType ? opts.inputType : 'text';
+ scope.data.response = opts.defaultText ? opts.defaultText : '';
+ scope.data.placeholder = opts.inputPlaceholder ? opts.inputPlaceholder : '';
+ scope.data.maxlength = opts.maxLength ? parseInt(opts.maxLength) : '';
var text = '';
if (opts.template && /<[a-z][\s\S]*>/i.test(opts.template) === false) {
text = '' + opts.template + '';
delete opts.template;
}
return showPopup(extend({
- template: text + '',
+ template: text + '',
scope: scope,
buttons: [{
text: opts.cancelText || 'Cancel',