简体   繁体   中英

angular material - sidenav from the bottom?

Angular material sidenav seems to have a left/right options :

  • <md-sidenav class="md-sidenav-**right**">
  • <md-sidenav class="md-sidenav-**left**">

Although it is called a "side"-nav, is it possible to use it as a "bottom"-nav?

if so how can it be done?

there is no bottom-nav as you said, but you can do it using https://material.angularjs.org/latest/demo/bottomSheet

VIEW

<div class="bottom-sheet-demo inset" layout="row" layout-sm="column" layout-align="center" >
    <md-button flex="50" class="md-primary md-raised" ng-click="showBottomSheet()">Show</md-button>
  </div>

JS

$scope.showBottomSheet = function() {
    $scope.alert = '';
    $mdBottomSheet.show({
      templateUrl: 'bottom-sheet-template.html',
      controller: 'BottomSheetCtrl'
    }).then(function(clickedItem) {
      $scope.alert = clickedItem['name'] + ' clicked!';
    });
  };

棱角材料不支持底部导航..您必须手动实现。

I think that what you are trying to achieve can be done by overwriting angular material styles to suit your needs. Just add some custom class or id to <md-sidenav> element and apply your styles.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM