without specific code (make a plnkr.co mockup) to look at, I'll be generic in my advice. But my advice is, try using ng-if directives on your elements. I've done stuff like <option ng-if="view.showingThisElement">this element</option> before, and it'll auto update in the digest cycle when view.showingThisElement changes.
e On Mon, Aug 18, 2014 at 8:46 AM, Alex Popov <[email protected]> wrote: > I have some problem with creating custom select. > I have three views of select: Enabled for edit, Disabled for edit, and > Disabled view. > The difference between last two disabled forms is: > 1) Show disabled "Choose.." > 2) Show disabled "None" > In my templates i have "Choose" like default value. So if my > select's-ngModel not selected - i should show 'None' in 3rd view (Replace > all options for <option>None</option>) > And the problem is in getting correct model-value, it can be selected > later via api-factory etc.. > attrs.$observe is not helping, add $watch is too risky > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
