Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make compatible with Angular 1.5 and non-cached templates
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
- Loading branch information