isteven / angular-multi-select

A multi select dropdown directive for AngularJS. Allows you to use HTML tags and CSS in the data. Requires only AngularJS and nothing else.
isteven.github.io/angular-multi-select
MIT License
1.08k stars 518 forks source link

Issue injecting multi-select directive into another directive with same scope #572

Open highelves opened 5 years ago

highelves commented 5 years ago

Hi, I'm basically trying to build an app containing multiple directives. I appreciate the code snippet overall. I am able to use your directive seamlessly over another plain AngularJS view.

Issue: I'm trying to inject your multi-select directive into a modal directive (modal window), which is failing here with the error

TypeError: Cannot read property 'getElementsByTagName' of undefined at Scope.$scope.getFormElements I see that over the line element.children().children().next().children().children()[ 0 ] , it is receiving the element.children().children() as empty HTMLCollection [] , thereby returning undefined,

Can you give any suggestions? [Already checked #201 , not related to that]