I have a table that uses angular orderbans. I use a function named tcoSort which calculates and then The problem is that when I call displayPullPricing () from the radio button in rows - table sorting loses the table.
& lt; Table class = "table table-stripe table-hover" & gt; & Lt; Tr ng- Repeat = "value in the product .document command: tcoSort" & gt; & Lt; TD & gt; On {{prices.monthly.retailPrice}} & lt £; / TD & gt; & Lt; TD & gt; £ {{prices.nonRecurring.retailPrice | Number: 0}} & lt; / TD & gt; & Lt; Td> & Lt; Input type = "radio" name = "{{productVariant.code}}" ng-click = "display complete ($ index)" & gt; & Lt; / Td> & Lt; / TR & gt;
Monthly.retailprice * 36); }}; $ Scope.displayFullPricing = function (index) {$ scope.isDisplayPrice = true; // This is to prevent table sorting from running more than once. I put it here to act as a flag because every time this function was called by the radio button, TCOART will set fire again and sort the table. This meant that the radio button will only work once. // Rest of the code code
}
I think the problem is that I stop getting happening in every way after clicking a radio button on the table I am making flags for me. But if I do not keep it, the $ index is always set to the top result - so it would always be 0. Any help or comments are appreciated thanks.
No comments:
Post a Comment