Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Not working in angular 1.5 #1372

Closed
shlomiassaf opened this issue Dec 29, 2015 · 2 comments
Closed

Not working in angular 1.5 #1372

shlomiassaf opened this issue Dec 29, 2015 · 2 comments

Comments

@shlomiassaf
Copy link

Well, no one is looking at issues in this repo but i`ll take a shot.

Angular 1.5.0-rc.0, ui-select isn't working.

After some investigation I believe its either mutli transclude options or lazy/eager compilation for directive with transclude.

I have a strong feeling its the lazy/eager compilation.
Read more about it here

I have tried to replicate it with simple directive built from scratch without success.
I tried adding an element via the "compile" directive handler, nothing broke... and many more.
Basically I tried to mimic ui.select's behavior have a directive with a transclude functions calling another directive...

Deep debugging into angular core shows that when the core "compile" function is called, it tries to find child directives, it does find them (i.e: finds ui-select-single directive) and it tries to compile it.

Here, the new lazy compile feature kicks in. Instead of compiling ad-hoc it returns a function that will compile when called, lazy...

I dont know if its an angular bug since I cant replicate it with simple directive, this is clearly an edge case used by ui.select and I cant trace it...

See angular/angular.js#13652

ideas?

@shlomiassaf
Copy link
Author

The error in console (raised by ui.select since the child directive was never compiled)

Error: [ui.select:transcluded] Expected 1 .ui-select-match but got '0'.
    at http://localhost:8080/lib/ui-select/dist/select.js:119:12
    at http://localhost:8080/lib/ui-select/dist/select.js:972:19
    at publicLinkFn (http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:7917:29)
    at http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:8259:29
    at boundTranscludeFn (http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:8056:16)
    at controllersBoundTransclude (http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:8812:20)
    at http://localhost:8080/lib/ui-select/dist/select.js:960:9
    at invokeLinkFn (http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:9284:9)
    at nodeLinkFn (http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:8770:11)
    at http://localhost:8080/lib/angular1.5.0-rc.0/angular.js:9023:13 <div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}" ng-model="ctrl.selectedValue">

@shlomiassaf
Copy link
Author

Duplicate - #1356

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

No branches or pull requests

1 participant