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

Does not work with latest angular 1.5.0-build... #1239

Closed
NathanWalker opened this issue Oct 8, 2015 · 14 comments
Closed

Does not work with latest angular 1.5.0-build... #1239

NathanWalker opened this issue Oct 8, 2015 · 14 comments

Comments

@NathanWalker
Copy link

Error: [ui.select:transcluded] http://errors.angularjs.org/1.5.0-build.4310+sha.0c8a9a0/ui.select/transcluded?p0=Expected%201%20.ui-select-match%20but%20got%20'%7B0%7D'.&p1=0
    at ...ommitted...
    at http://localhost:8000/scripts/support/uiselect.js:968:19
    at ...ommitted...
    at ...ommitted...
    at ...ommitted...
    at p (...ommitted...)
    at uis.directive.$timeout.compile (http://localhost:8000/scripts/support/uiselect.js:956:9)
    at ca (...ommitted...)
    at L (...ommitted...)
    at ...ommitted... <div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}" ng-model="foundItem.selected" theme="bootstrap" reset-search-input="false" on-select="selectedSearch($item, $model)" style="width: 80%">(anonymous function) @ ...ommitted...(anonymous function) @ ...ommitted...:86(anonymous function) @ ...ommitted...:10616ca @ ...ommitted...:79L @ ...ommitted...:67(anonymous function) @ ...ommitted...:74(anonymous function) @ ...ommitted...:124n.$eval @ ...ommitted...:139n.$digest @ ...ommitted...:136n.$apply @ ...ommitted...:139(anonymous function) @ ...ommitted...:4490n.event.dispatch @ ...ommitted...:3r.handle @ ...ommitted...:3
@NathanWalker NathanWalker changed the title Does not work with latest angular Does not work with latest angular 1.5.0-build... Oct 8, 2015
@ravishivt
Copy link

For me, it works with 1.5.0-beta.0, but not with 1.5.0-beta.1. I forked the plnkr in the documentation and only changed the Angular src to 1.5.0-beta.1, available here. Switch between beta.0 and beta.1 to see it work / not work. This is the error it generates on beta.1:

Error: [ui.select:transcluded] Expected 1 .ui-select-match but got '0'.
    at http://run.plnkr.co/gBd3G34T3oawEWpT/select.js:118:12
    at http://run.plnkr.co/gBd3G34T3oawEWpT/select.js:909:19
    at publicLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:7561:29)
    at name.$get.previousCompileContext (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:7900:29)
    at name.$get.boundTranscludeFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:7706:16)
    at controllersBoundTransclude (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:8377:18)
    at uis.directive.$timeout.compile (http://run.plnkr.co/gBd3G34T3oawEWpT/select.js:897:9)
    at invokeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:8850:9)
    at nodeLinkFn (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:8350:11)
    at http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-beta.1/angular.js:8580:13 <div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}" ng-model="address.selected" theme="bootstrap" ng-disabled="disabled" reset-search-input="false" style="width: 300px;">

@NathanWalker
Copy link
Author

That is exactly right @ravishivt ! thanks for clarifying, I'm using 1.5.0-beta.1

@billforward-alex
Copy link

I was previously specifying for all Angular dependencies in my bower.json: ~1.5.0-beta.0. This produced the described error.

Tightened the bound to 1.5.0-beta.0 and it's working again. :)

@NathanWalker
Copy link
Author

Any status on making compatible with the beta.1 since that's the direction the 1.x series of Angular is taking?

@scatcher
Copy link

Still doesn't work in beta.2.

@ergomesh
Copy link

I confirm this also doesn't work with the latest beta.2

@goleafs
Copy link

goleafs commented Nov 26, 2015

+1
only thing preventing us from moving to beta 2 :(

@ergomesh
Copy link

it also does not work with beta.1 but does work with beta.0

@nickmorton
Copy link

Duplicate thread see

@avgalon
Copy link

avgalon commented Feb 7, 2016

It does not work with 1.5 release.....do you plan to fix it soon?

@soichih
Copy link

soichih commented Feb 8, 2016

My app got upgraded to angular 1.5 and ui.select is breaking.. Should I downgrade to Angular 1.4?

@mrded
Copy link

mrded commented Feb 8, 2016

Angular 1.5.0-rc.2 still not working.

Narretz added a commit to Narretz/ui-select that referenced this issue Feb 12, 2016
In Angular 1.5, transcluded content is linked lazily.
For uiSelect that means the clone in the transclude function is not compiled and linked yet, so
uiSelect cannot detect the match and choices elements by their classnames, because they haven't been
set yet (which happens by replacing the elements with the templates).
However, the templateUrl function is executed at this point, so we can use it to add the
class names to the directive elements.

On another note, this behavior also affected versions earlier than 1.5.0-beta.2, when the template
of ui-select-match or ui-select-choices wasn't cached. In that case, the async compilation of
the template would mean also that the clone in the transclude function wasn't compiled yet, and so
the classes wouldn't be set either.

Closes angular-ui#1422
Closes angular-ui#1356
Closes angular-ui#1325
Closes angular-ui#1239
Narretz added a commit to Narretz/ui-select that referenced this issue Feb 12, 2016
In Angular 1.5, transcluded content is compiled lazily.
For uiSelect that means the clone in the transclude function is not compiled and linked yet, so
uiSelect cannot detect the match and choices elements by their classnames, because they haven't been
set yet (which happens by replacing the elements with the templates).
However, the templateUrl function is executed at this point, so we can use it to add the
class names to the directive elements.

On another note, this behavior also affected versions earlier than 1.5.0-beta.2, when the template
of ui-select-match or ui-select-choices wasn't cached. In that case, the async compilation of
the template would mean also that the clone in the transclude function wasn't compiled yet, and so
the classes wouldn't be set either. This might be the cause of the error described in issue angular-ui#224.

Closes angular-ui#1422
Closes angular-ui#1356
Closes angular-ui#1325
Closes angular-ui#1239
@harrylog
Copy link

harrylog commented Jun 8, 2016

so what ui-select can i use in angular 1.5

@soichih
Copy link

soichih commented Sep 25, 2016

I've switched from angular-ui-select to just ui-select and it started working for angular 1.5

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