DonJuwe
DonJuwe

Reputation: 4563

Select2 directive callback when rendering done

I want to trigger a callback or event when my ui-select2 directive

<input
    type="hidden"
    ui-select2="myConstructorObject"
    ng-model="myModel"
    required />

has rendered the Select2 DOM elements. How can I achieve this? Is there any constructor atrribute I am not aware of?

Upvotes: 0

Views: 1260

Answers (1)

DonJuwe
DonJuwe

Reputation: 4563

FYI, I achieved it by adding a directive to the select2 element which listens to the select2-loaded event. This event is fired when the DOM object is completely initiated.

Upvotes: 1

Related Questions