Skip to content

Commit 56e9706

Browse files
fix for inputPlaceholder quotes per #4707
1 parent a98d8d5 commit 56e9706

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: js/angular/service/popup.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,9 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
466466
function showPrompt(opts) {
467467
var scope = $rootScope.$new(true);
468468
scope.data = {};
469-
scope.data.response = opts.defaultText ? opts.defaultText : '';
469+
scope.data.response = opts.defaultText ? opts.defaultText : '';
470+
scope.data.placeholder = opts.inputPlaceholder ? opts.inputPlaceholder : '';
471+
scope.data.maxlength = opts.maxLength ? parseInt(opts.maxLength) : '';
470472
var text = '';
471473
if (opts.template && /<[a-z][\s\S]*>/i.test(opts.template) === false) {
472474
text = '<span>' + opts.template + '</span>';
@@ -475,8 +477,8 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
475477
return showPopup(extend({
476478
template: text + '<input ng-model="data.response" '
477479
+ 'type="' + (opts.inputType || 'text') + '" '
478-
+ (opts.maxLength ? 'maxlength="' + parseInt(opts.maxLength) + '" ' : '')
479-
+ 'placeholder="' + (opts.inputPlaceholder || '') + '"'
480+
+ 'maxlength="{{ data.maxlength }}"'
481+
+ 'placeholder="{{ data.placeholder }}"'
480482
+ '>',
481483
scope: scope,
482484
buttons: [{

0 commit comments

Comments
 (0)