Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(directive): priority with value 1 blocks proper loading when inside another directive #50

Open
mateusleon opened this issue Aug 5, 2016 · 0 comments

Comments

@mateusleon
Copy link

mateusleon commented Aug 5, 2016

Hello, thanks for you work, I really appreciate it!

I need to alert you for one issue founded when using this kind of priority with angular-select2.

Suppose that you want to provide a directive, with angular-select2 inside it, to handle some common stuff together (e.g.: like a search box, with some filters together, component-like search bundle), and you need to provide options for angular-select2 with a scope variable.

Due to the higher priority of angular-select2, over the wrapper directive one, which isn't even declared (to be added in the queue as it was loaded), those options declared on the scope of the wrapper directive are not available for angular-select2 (are coming undefined on line 55 (https://github.com/rubenv/angular-select2/blob/master/src/select2.js#L55).

Also, these options, if for some reason they need to be changed, it doesn't reflects on angular-select2 instance that's already running.

Plunker to the test case: https://plnkr.co/edit/XxMYjSEuoH9yImawAxhp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant