Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/list-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,11 @@ angular.module('ui.listInput', [])
transcludedInput.eq(transcludedInput.length - 1).attr('ng-blur', 'updateItems()');
}
else {
// The transcluded content did not have an input, so create one.
// The transcluded content did not have an input, so create.
// add a placeholder
var placholdercontent = 'placeholder="'+attributes.placeholder+'"'
if (transcludedInput.length === 0) {
transcludedInput = angular.element('<input name="listItem" type="text" class="form-control" />');
transcludedInput = angular.element('<input name="listItem" type="text" class="form-control" '+placholdercontent+' />');
}

// Enforce a name for validation
Expand Down Expand Up @@ -513,4 +515,4 @@ angular.module('ui.listInput', [])
templateUrl: 'remove-item-button.tpl.html',
replace: true
};
});
});