You need to use an isolate scope, or use different result variables. If ng-bind-html is bound to purgeResult in all N cases, it's the same variable in each place.
So purgeResults[N] or make a directive that defines an isolate scope. I prefer the latter. e On Tue, Sep 9, 2014 at 11:05 AM, Anil Mathew <[email protected]> wrote: > Hi, > > I was trying to use ng-bind-html dynamically. In other words, I have a > code like this - http://plnkr.co/edit/k1qcnzmY75VdaFblndXo?p=catalogue > > So once I click the 'Purge' button it calls purgeCache() function and I > wanted to display "Success" message in the "purgeResult" span. The issue I > am facing is that when I clicked the first button I am getting "Success" > message against all the buttons. > > Can some one please help me? > > Thanks > Anil > > -- > 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. > -- 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.
