Md内容不滚动

时间:2016-09-17 12:42:46

标签: html angularjs angular-material

我尝试使用和粘贴标题创建一个2列的网站,但我没有正常滚动。

的index.html

<body layout="column">
    <navbar></navbar> <!-- directive header -->
    <ng-view></ng-view> <!-- main view -->
    <foot></foot>     <!-- directive footer-->
</body>

main.html中

<md-sidenav class="md-sidenav-left" md-component-id="left" md-whiteframe="4">

    <md-toolbar class="md-theme-indigo">
        <h1 class="md-toolbar-tools">Sidenav Left</h1>
    </md-toolbar>
    <md-content layout-padding ng-controller="LeftCtrl">
        <p hide show-gt-md>
            Filters
        </p>
    </md-content>

</md-sidenav>

<md-content flex style="overflow-y:auto">
    <!-- Large text -->
</md-content>

navbar.html

 <md-toolbar layout="row">
  <button ng-click="toggleSidenav('left')" hide-gt-sm class="menuBtn">
    <span class="visually-hidden">Menu</span>
  </button>
  <h1 class="md-toolbar-tools" layout-align-gt-sm="center">Hello World</h1>
</md-toolbar>

1 个答案:

答案 0 :(得分:1)

将此内容添加到ng-view中,因为你将md-content嵌入其中,

 <ng-view  flex layout="column" style="overflow: scroll;" ></ng-view>

DEMO