@@ -251,9 +251,10 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
251
251
* cssClass: '', // String, The custom CSS class name
252
252
* subTitle: '', // String (optional). The sub-title of the popup.
253
253
* template: '', // String (optional). The html template to place in the popup body.
254
- * templateUrl: '', // String (optional). The URL of an html template to place in the popup body.
254
+ * templateUrl: '', // String (optional). The URL of an html template to place in the popup body.
255
255
* inputType: // String (default: 'text'). The type of input to use
256
256
* defaultText: // String (default: ''). The initial value placed into the input.
257
+ * maxLength: // Integer (default: null). Specify a maxlength attribute for the input.
257
258
* inputPlaceholder: // String (default: ''). A placeholder to use for the input.
258
259
* cancelText: // String (default: 'Cancel'. The text of the Cancel button.
259
260
* cancelType: // String (default: 'button-default'). The type of the Cancel button.
@@ -472,8 +473,11 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
472
473
delete opts . template ;
473
474
}
474
475
return showPopup ( extend ( {
475
- template : text + '<input ng-model="data.response" type="' + ( opts . inputType || 'text' ) +
476
- '" placeholder="' + ( opts . inputPlaceholder || '' ) + '">' ,
476
+ template : text + '<input ng-model="data.response" '
477
+ + 'type="' + ( opts . inputType || 'text' ) + '" '
478
+ + ( opts . maxLength ? 'maxlength="' + parseInt ( opts . maxLength ) + '" ' : '' )
479
+ + 'placeholder="' + ( opts . inputPlaceholder || '' ) + '"'
480
+ + '>' ,
477
481
scope : scope ,
478
482
buttons : [ {
479
483
text : opts . cancelText || 'Cancel' ,
0 commit comments