Dallas Clark
Dallas Clark

Reputation: 4112

angular-ui-select2 query function not defined when used within another directive

I'm trying to use the angular-ui-select2 module within another directive but I receive the following error:

query function not defined for Select2 undefined

When I place the following code in a page of it's own, it works fine:

<input ng-model="select2" data-ui-select2="select2Options" type="hidden" />

Upvotes: 1

Views: 388

Answers (1)

Dallas Clark
Dallas Clark

Reputation: 4112

I was able to resolve this issue by my code from the link function to the controller function in my directive.

Upvotes: 1

Related Questions