var prevPosition = 0;
document.addEventListener('scroll', onScroll);
function onScroll() {
if (document.body.scrollTop > prevPosition) {
menu.removeClass('menu-open');
} else {
menu.addClass('menu-open');
}
prevPosition = document.body.scrollTop;
}
<table>
<tr ng-repeat="item in data">
<td ng-repeat="value in item">{{value}}</td>
</tr>
</table>