我的顶部工具栏滚动以收集Angular Material

时间:2015-08-13 08:51:45

标签: angularjs angular-material

我在codepen中按角度示例。

但我的问题是,我的工具栏仍然滚动,整个页面仍然可以在侧边栏打开时滚动。

这里是我的代码

<body ng-controller="MainCtrl">
    <!--[if lte IE 8]>
      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->
    <!-- Add your site or application content here -->
    <md-toolbar layout="row" class="top-bar">
        <div class="md-toolbar-tools">
            <md-button ng-click="toggleLeft()" class="md-icon-button" aria-label="Settings">
                <span class="burger-lines"></span>
            </md-button>
            <h1><span ng-bind="title"></span></h1>
            <span flex></span>
        </div>
    </md-toolbar>
    <div ng-include="'views/sidebar.html'"></div>
    <div layout="row" flex>

            <div layout="column" flex ng-view=""></div>

    </div>

sidebar.html

<md-sidenav class="md-sidenav-left md-whiteframe-z2" md-component-id="left">
    <md-toolbar class="top-bar">
        <h1 class="md-toolbar-tools">Sidenav Left</h1>
    </md-toolbar>
    <md-content layout-padding ng-controller="SidebarCtrl">
        <md-button ng-click="close()" class="md-primary">
            Close Sidenav Left
        </md-button>
    </md-content>
</md-sidenav>

0 个答案:

没有答案