美文网首页我爱编程
angular判断页面离开

angular判断页面离开

作者: holy俊辉 | 来源:发表于2018-05-24 16:22 被阅读20次

angular判断页面离开

当进入一个页面的时候,需要对该页面进行一些操作,但是当页面离开之后需要恢复该状态,
比如如果进入该页面需要对父元素的滚动条进行调整,但是离开页面之后需要恢复其原有状态

 $(".content").css("overflowX","scroll")
            $scope.$on('$locationChangeStart', function (event, next, current) {
                console.log("333333333333333")
                $(".content").css("overflowX","auto")
            });

相关文章

网友评论

    本文标题:angular判断页面离开

    本文链接:https://www.haomeiwen.com/subject/aupsjftx.html