Hi,I came across a problem where a radio input's model doesn't appear to bind correctly inside of a repeater. Here's the fiddle: http://jsfiddle.net/mishabosin/pSZHG/
I found this resolved issue: https://github.com/ angular/angular.js/issues/869 in my search for a solution, but it appears to be a slightly different problem.
Please let me know if there's a workaround, or if I should file a bug.Thanks for an amazing framework!-Misha
In general binding on scope properties is tricky because of scope inheritance. Better to bind on some other object such as controller. See: http://jsfiddle.net/w5TJW/2/
On Tue, May 8, 2012 at 12:47 PM, Dan Doyon <dand...@yahoo.com> wrote:
+1 on Mathias' solution and pointing out that ng-repeat does create new scope for each element.
To: ang...@googlegroups.com
Sent: Tuesday, May 8, 2012 12:19 PM
Subject: [angular.js] Re: Radio input iside of a repeater is still broken.
Hey!Api-Docs state the following:"This directive creates new scope."
I forked your fiddle and used $parent.selectedIndex instead of selectedIndex for ng-model:Works for me so far, but I don't know if this is how it is supposed to be used regarding ng:repeat.Cheers,Matthias
On Tuesday, May 8, 2012 8:39:03 PM UTC+2, mishabosin wrote:Hi,I came across a problem where a radio input's model doesn't appear to bind correctly inside of a repeater. Here's the fiddle: http://jsfiddle.net/mishabosin/pSZHG/I found this resolved issue: https://github.com/ angular/angular.js/issues/869 in my search for a solution, but it appears to be a slightly different problem.Please let me know if there's a workaround, or if I should file a bug.Thanks for an amazing framework!-Misha
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/xNSJFZTQeJwJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
Good tip +1 - thanks
On Wednesday, May 9, 2012 2:03:01 PM UTC+12, Misko Hevery wrote:
In general binding on scope properties is tricky because of scope inheritance. Better to bind on some other object such as controller. See: http://jsfiddle.net/w5TJW/2/
On Tue, May 8, 2012 at 12:47 PM, Dan Doyon <dand...@yahoo.com> wrote:
+1 on Mathias' solution and pointing out that ng-repeat does create new scope for each element.
To: ang...@googlegroups.com
Sent: Tuesday, May 8, 2012 12:19 PM
Subject: [angular.js] Re: Radio input iside of a repeater is still broken.
Hey!Api-Docs state the following:"This directive creates new scope."
I forked your fiddle and used $parent.selectedIndex instead of selectedIndex for ng-model:Works for me so far, but I don't know if this is how it is supposed to be used regarding ng:repeat.Cheers,Matthias
On Tuesday, May 8, 2012 8:39:03 PM UTC+2, mishabosin wrote:Hi,I came across a problem where a radio input's model doesn't appear to bind correctly inside of a repeater. Here's the fiddle: http://jsfiddle.net/mishabosin/pSZHG/I found this resolved issue: https://github.com/ angular/angular.js/issues/869 in my search for a solution, but it appears to be a slightly different problem.Please let me know if there's a workaround, or if I should file a bug.Thanks for an amazing framework!-Misha
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/xNSJFZTQeJwJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.