ng2-select2 icon indicating copy to clipboard operation
ng2-select2 copied to clipboard

Support <option> tags

Open achimha opened this issue 9 years ago • 3 comments

The original select2 can work with <option> tags below it. Example:

<select id="foo">
  <option value="1">First option</option>
  <option value="2">Second option</option>
</select>

And then turn it into a select2 control:

$("#optimize").select2({ minimumResultsForSearch: -1 });

I think this control should support the same markup:

<select2 id="foo">
  <option value="1">First option</option>
  <option value="2">Second option</option>
</select2>

It could be easily done using <ng-content></ng-content>.

achimha avatar Feb 24 '17 12:02 achimha

I have this basically working and will provide a PR once the current ones are in.

achimha avatar Feb 24 '17 13:02 achimha

Ok, sound's good. Will merge current PR's today.

NejcZdovc avatar Feb 24 '17 14:02 NejcZdovc

PR: https://github.com/NejcZdovc/ng2-select2/pull/67

achimha avatar Feb 24 '17 17:02 achimha