Here's an even simpler example that works in Chrome, but not in Firefox! I don't even need to use ng-repeat to cause the binding expression to not be evaluated.
http://plnkr.co/edit/hU6gZeLvpmy4g7b0wPdN?p=preview <!DOCTYPE html> <html ng-app> <head> <script src=" https://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.js"></script> </head> <body> <select> <option>{{'foo'}}</option> </select> </body> </html> On Tue, Aug 5, 2014 at 5:04 PM, Mark Volkmann <[email protected]> wrote: > Check out this new plunk: > http://plnkr.co/edit/UnlmYHqKlSZXW0kabvYd?p=preview > > I have testing this in Chrome, Firefox, and IE8. Plunkr itself seems not > to work in IE8, but if I server up this file using a simple Express server > I see that the binding expression in the option does not get evaluated if > the select is inside an element that uses ng-repeat. You get select where > the text in the first and only option is "{{'bar'}}" instead of just "bar". > It turns out this also happens in Firefox, but not in Chrome. > > Here's the code from the plunk: > > <!DOCTYPE html> > <html ng-app="Demo"> > <head> > <script src=" > https://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.js > "></script> > <script> > var app = angular.module('Demo', []); > app.controller('DemoCtrl', function ($scope) { > $scope.items = ['A', 'B', 'C']; > }); > </script> > </head> > <body ng-controller="DemoCtrl"> > <div ng-repeat="item in items"> > <select> > <option>{{'bar'}}</option> > </select> > </div> > </body> > </html> > > > On Tue, Aug 5, 2014 at 4:33 PM, Mark Volkmann <[email protected]> > wrote: > >> I'm using IE8. I think my issue was related to the browser switching into >> quirks mode. I'm working on coming up with a better code sample to >> demonstrate the problem I'm hitting. I'll post another soon. >> >> >> On Tue, Aug 5, 2014 at 2:05 PM, Charly Poly <[email protected]> wrote: >> >>> Hi Mark, >>> >>> Which IE version do you use for this test ? >>> >>> Regards, >>> Charly. >>> >>> >>> On Tuesday, 5 August 2014 20:12:55 UTC+2, Mark Volkmann wrote: >>>> >>>> This plunk works fine in Chrome, but the same code doesn't work >>>> correctly in IE. >>>> http://plnkr.co/edit/xTly4Bq8MI3zXEYiR0zm?p=preview >>>> >>>> Here's the HTML from the plunk: >>>> >>>> <html ng-app> >>>> <head> >>>> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2. >>>> 21/angular.min.js"></script> >>>> </head> >>>> <body> >>>> <select> >>>> <option>{{'foo'}}</option> >>>> <option>{{'bar'}}</option> >>>> </body> >>>> </html> >>>> >>>> Instead of seeing "foo" for the first option in the select, I see >>>> {{'foo'}}, an unevaluated binding expression. Is there an alternative way >>>> to do this that works in IE? >>>> >>>> Note that in my real app. there is a reason I need to use a binding >>>> expression and not just a literal value. >>>> >>>> -- >>>> R. Mark Volkmann >>>> Object Computing, Inc. >>>> >>> -- >>> 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. >>> >> >> >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> > > > > -- > R. Mark Volkmann > Object Computing, Inc. > -- R. Mark Volkmann Object Computing, Inc. -- 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.
