I have a four tables that populates data using ng-repeat and I have some validation to show one table or another depending on a radio button selection.
I call a CSS id in the table called "fixtable". The issue is that if I remove the ng-if of any of the tables it works, the header is fixed but I need those validations to show or hide the tables.
It looks like angular dont recognize the "id" property or I dont know.
Any help on this, Im in a hurry.
<div ng-if="topTable.value === 'topCategory'" ng-show="loadViewCategories">
<table class="table" id="fixTable">
some code
</table>
<div ng-if="topTable.value === 'topBrand'" ng-show="loadViewBrand">
<table class="table" id="fixTable2">
some code
</table>
Inside the HTML I call my function to make the fiexd header like this
<script>
$(document).ready(function() {
$("#fixTable").tableHeadFixer();
$("#fixTable2").tableHeadFixer();
$("#fixTable3").tableHeadFixer();
$("#fixTable4").tableHeadFixer();
});
</script>
And I have some CSS that makes my table scrollable all the way to the right
#fixTable {
width: 2700px !important;
}
#fixTable2 {
width: 2700px !important;
}
#fixTable3 {
width: 2700px !important;
}
#fixTable4 {
width: 2700px !important;
}