0
I’m trying to apply this class to is when I roll the page to pin my menu to the top of the screen, but the class is not being set:
<div class="page-header-menu" ng-class="{'fixed':(document.documentElement.scrollTop > 74)}">
<!-- aplicação-->
</div>
I’m using version 1.2.30.
My thanks to those who answer.
Put this here
{{(document.documentElement.scrollTop > 74)}}
, in the view, does it work? I mean, it shows something?– Jéf Bueno
creates in your controller a $Scope variable that loads the result of
document.documentElement.scrollTop
and makes the ng-class conditional using this variable. with me it worked so.– Aldo Fernandes Junior