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

Properly handle HTML5 data-* attributes #579

Merged
merged 1 commit into from
Feb 16, 2015
Merged

Conversation

mkielar
Copy link
Contributor

@mkielar mkielar commented Jan 13, 2015

Hi,

I set up a small fix, so one could use data-* attributes for ui-select-match and ui-select-choices.
After this fix, something like this is possible:

<div data-ui-select data-ng-model="vm.selectedItem" data-theme="bootstrap" data-reset-search-input="false">
    <div data-ui-select-match data-placeholder="select sth...">
        {{ $select.selected }}
    </div>
    <div data-ui-select-choices data-repeat="item in vm.possibleItems| filter: $select.search">
        <span data-ng-bind-html="item | highlight: $select.search"></span>
    </div>
</div>

Without the fix this code causes Google Chrome to hang (some JS goes into the loop, probably the one described in the comment on line 1179 and 1186). With the fix it just works, and one can have a HTML5-validatable template.

Properly handle HTML5 data attributes
dimirc added a commit that referenced this pull request Feb 16, 2015
Properly handle HTML5 data-* attributes
@dimirc dimirc merged commit 73e30ec into angular-ui:master Feb 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants