-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Transcluded clone is not compiled in 1.5.0-rc-0 in ui-select #13527
Comments
It looks like ui-select is using an API that was deprecated in 1.2.1 90f8707 Unless someone comes with a small and clean patch, I think that this should not get fixed. Anyhow, will leave this open for other contributors to comment. |
I think this should be marked as breaking change since many can have this issue |
@bogdanalexe90 I agree that a notice is needed @petebacondarwin WDYT? |
And btw i tried to refactor and remove Just play a bit with some break points. |
@lgalfaso - Given that this was deprecated way back in 1.2.1 - do you think we could get away with removing it completely in 1.5? Especially if it seems that the transclude changes make it fail. |
Has anyone created an issue against ui-select for this too? |
Actually I am not convinced that I wonder if the actual bug is that our lazy compilation is not kicking in for the cloned transcluded content at the time it arrives in the clone attach function? |
I think that I understand the issue. Things happen in this order: Angular 1.4.x
Angular 1.5.x
It looks like From all this, it looks like the issue is not the deprecated API |
This was never warranted, only that the cloned element would be compiled and linked at some point in time (that may turn out to be when the server responds with the template or any other reason). |
+1... ui-select is the only library preventing me from update -.- |
@lgalfaso is spot on, ui-select only worked 100% if the templates are put in the cache. See this plnkr for a contrived example: http://plnkr.co/edit/sRIW4LJ2VpSBJZAnODvY?p=preview Sure, that's best practice and probably no user removed them from the cache. But that doesn't change the fact that ui-select should wait for the ui-select-match to be available. A parent directive reaching into its children without any safeguards ... seems wrong to me. ui-select-match / ui-select-choices should instead call on ui-select once they are linked. Similarly to how ngMessages does it. |
Closing, since it's not an issue with angular core. ui-select also has a new contributor, so I'm confident this will be fixed soon. |
looks like it was fixed angular-ui/ui-select#1430 by you 💯 |
After upgrading to
1.5.0-rc-0
,ui-select
has stopped working. After a short look it seems that they use atranscludeFn
with acloneAttachFn
. The cloned element fromcloneAttachFn
is not compiled.I created a plunkr to show the problem:
http://plnkr.co/edit/TB59p33RPPS0rgA01tlj?p=preview
The text was updated successfully, but these errors were encountered: