These are chat archives for angular-ui/ui-select

1st
Feb 2016
jdmpnn
@jdmpnn
Feb 01 2016 07:38
@JonasHans91 Try ng-model="$parent.selected" or "myvariable.selected", directly it won't work, as of this https://github.com/angular-ui/ui-select/wiki/FAQs#ng-model-not-working-with-a-simple-variable-on-scope
jdmpnn
@jdmpnn
Feb 01 2016 07:48
It is because ui-select creates isolate scope, and if you write ng-model="selected", you actually will bind it to the variable of that inner ui-select scope, but still have no access to it in such case
JonasHans91
@JonasHans91
Feb 01 2016 12:27
Thanks a lot ;)
jdmpnn
@jdmpnn
Feb 01 2016 13:53
@JonasHans91 You are welcome :-)
a
@imjakechapman Yes, ui-select uses template cache, so what you can do is:
  1. copy templates from ui-select sources, compile them as <script type="ng-template" id="mytheme123/choices.html", etc. and then in the ui-select directive, point out to use that theme <ui-select theme="mytheme123"
jdmpnn
@jdmpnn
Feb 01 2016 13:58
Sorry, not compile, well, insert them into your document
  1. There you can add eny extra classes or remove ones, and modify the styles as you want. Just be carefull that a couple of elements in templates are actually directives, they are inserted on directive compile stage, for example ui-select-single and ui-select-multiple, depending on the type of used ui-select
Sorry about that dull '1.', I wanted to write step-by-step, but didn't manage to find whether it's Enter or Ctrl+Enter :-D