This repository was archived by the owner on Oct 2, 2019. It is now read-only.
Avoid double-compilation of ui-select-choices directive. #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notes:
an angular template and then later transcluding content
and recompiling the entire element at post-link time, do
not provide a template but edit the template element in
compile prior to linking. This approach allows the template
to be fully constructed before the link phase and avoids
any complications with double-linking the same element
and/or issues with binding the transcluded contents to
the wrong scope and introducing memory leaks.
the transcluded content to the wrong scope (which was
also producing memory leaks), but solves the problem
in a different way -- namely preparing all of the content
before compilation. This also eliminates any need for an
additional helper directive.
directive as well -- as it was using "replace: true" which
is deprecated in Angular. However, because the ui-select-choices
element is no longer replaced, some changes had to be made to
the CSS to account for its existence. These may need to be
tweaked/simplified in the future -- the changes made were
intended to be as non-intrusive/deviate as little as possible
from any original intent.
the element that is transcluded is found by element tag
or attribute now, not by classname.