我按照角度材料网站上的说明进行了操作.
https://material.angularjs.org/latest/#/demo/material.components.menu
https://material.angularjs.org/latest/#/demo/material.components.menu
我遇到的问题是简单的下拉菜单和快速拨号只是静态而不是初始化.
似乎无法弄清楚我错过了什么.
<div layout="column"> <md-content class="md-padding" layout="column"> <div class="lock-size" layout="row" layout-align="center center"> <md-fab-speed-dial md-open="false" md-direction="up" ng-class="md-fling"> <md-fab-trigger> <md-button aria-label="menu" class="md-fab md-warn"> <i class="fa fa-car"></i> </md-button> </md-fab-trigger> <md-fab-actions> <md-button aria-label="twitter" class="md-fab md-raised md-mini"> <i class="fa fa-car"></i> </md-button> <md-button aria-label="facebook" class="md-fab md-raised md-mini"> <i class="fa fa-car"></i> </md-button> <md-button aria-label="Google hangout" class="md-fab md-raised md-mini"> <i class="fa fa-car"></i> </md-button> </md-fab-actions> </md-fab-speed-dial> </div> </md-content> </div>
我更改了< md-fab-speed-dial>上的ng-class属性.标记为简单的类,它现在有效.看看
this link from the Angular Material site.
在你的情况下,你应该:
<md-fab-speed-dial md-open="false" md-direction="up" class="md-fling">