Struggling with a problem while using Angular 1.* and angular-material.
The issue arises when dealing with views that plug into <div ng-view></div>
and md-content
. If the height of the view exceeds the viewport, it leads to the appearance of two vertical scroll bars side by side.
While it is possible to use overflow-y: hidden
on the md-content
, I am looking for a solution where the view extends the viewport horizontally only utilizing the outer scroll bar.
<body ng-app="app">
<md-toolbar class='md-medium-tall'>
<div class="main-title">
<img src="./images/yo-small.png">
<p class="top-title">foo</p>
<h5>Bar</h5>
</div>
</md-toolbar>
<div class="menu-container" layout="row">
<md-sidenav
md-is-locked-open="$mdMedia('min-width: 900px')"
class="md-sidenav-left"
md-whiteframe="0">
<md-menu-content>
<md-menu-item>
<md-button href="#ppv">
<md-icon class="material-icons" menu-align-target="">assessment</md-icon>
PPV</button>
</md-menu-item>
</md-menu-content>
</md-sidenav>
<md-content>
<div ng-view></div>
</md-content>
</div>
</body>
<div style="height: 1000px; width: 800px ">
<h1>mom</h1>
</div>
https://i.sstatic.net/TzzTZ.png
UPDATE: Managed to come up with a workaround for this issue. Any ideas on how to make it work smoothly?
md-content {
overflow-y: hidden;
}
angular.module('app')
.controller('PPVCtrl', ['$scope', function($scope) {
// fix for angular-material responsive issue
document.body.style.height = "800px";
$scope.$on('$destroy', function() {
document.body.style.height = "100%";
});
}]);