我按照材料设计演示中的代码进行了操作,但没有运气完全悬停(将鼠标悬停在按钮“应该”并且快速拨号将打开的位置)以便操作......
我的HTML
<md-content>
<md-fab-speed-dial ng-hide='CreateCtrl.hidden' md-direction="left" md-open='CreateCtrl.isOpen' class="md-fling" ng-class="{ 'md-hover-full': CreateCtrl.hover}" ng-mouseenter='CreateCtrl.isOpen=true' ng-mouseleave='CreateCtrl.isOpen=false'>
<md-fab-trigger>
<md-button aria-label="menu" class="md-fab md-primary">
<md-icon class='material-icons'>menu</md-icon>
<md-tooltip md-direction="bottom">Menu</md-tooltip>
</md-button>
</md-fab-trigger>
<md-fab-actions>
<md-button aria-label="add measure" class="md-accent md-fab md-raised md-mini" data-ng-click='addMeasure()'>
<md-icon class='material-icons'>add circle</md-icon>
<md-tooltip md-direction="bottom">Add Measure</md-tooltip>
</md-button>
...
</md-fab-actions>
</md-fab-speed-dial>
</md-content>
我的控制器
angular.module('musiComp').controller('CreateCtrl', ['$scope', '$routeParams', '$location', '$mdDialog', 'SongData' , function($scope, $routeParams, $location, $mdDialog, SongData) {
var self = this;
self.hidden = false;
self.isOpen = false;
self.hover = true;
答案 0 :(得分:0)
尝试更改md-open='CreateCtrl.isOpen'
并删除控制器名称(您不能将其称为功能(md-open='isOpen'
)
self.isOpen = false;
应为$scope.isOpen = false;
我还建议将ng-cloak
添加到<md-fab-speed-dial ng-cloak ...