On Thu, Mar 9, 2017 at 7:28 AM, David Karr <[email protected]> wrote: > I have a small SPA using AngularJS (1.6.1). It displays a table of data > obtained from a REST service. Some of the cells have text that should > render as a link, which when clicked will bring up a popup. Some of them > should not render as a link. > > The following is one of the "td" elements in my code: > <td align="right"> > <div ng-if="ratesMap[name + '-' + 15].totalCount > 0"> > <div ng-if="ratesMap[name + '-' + 15].failureCount > 0"> > <a href="#" ng-click="openErrorCounts(name, '15')"/> > </div> > <span data-toggle="tooltip" title="{{ratesMap[name + '-' + > 15].totalCount}} records"> > ({{ratesMap[name + '-' + 15].failureCount > > 0}}){{ratesMap[name + "-" + 15].successRate | percentage:2}} | > {{ratesMap[name + "-" + 15].avgTxTime | number:2}} ms > </span> > </div> > </td> > > For some reason, the "a" tag inside the second div is rendering even if the > condition in the "ng-if" attribute is false. I verify it's false by > temporarily adding the expression to the cell data. > > I must be making a very simple mistake, but it's not obvious to me.
I got this working. I guess the bigger mystery is how it ever rendered anything as a link, as the anchor tag is obviously not surrounding the span with the data. Not important now, as it's working. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" 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 https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
