Firefox 不支持 angular orientationchange 事件

Firefox not support angular orientationchange event

我在 FireFox 中遇到 orientationchange 的问题...在 Chrome 中我没有事件,事件被触发但在 FireFox 中它没有被调用。这是代码:

angular.element($window).on('orientationchange', function () { ... });

我有同样的问题:

angular.element($window).bind('orientationchange', function () { ... });

和本机 JavaScript 代码:

window.addEventListener('orientationchange', function () { ... });

我无法使用jQuery...有什么解决办法吗?

我终于使用了这个解决方案,它得到了很好的支持:

        $window.matchMedia("(orientation: portrait)").addListener(function(m) {
            // do something
        });