2 * Angular Material Design
3 * https://github.com/angular/material
7 goog.provide('ngmaterial.components.fabActions');
8 goog.require('ngmaterial.core');
14 * @name material.components.fabActions
16 MdFabActionsDirective['$inject'] = ["$mdUtil"];
18 .module('material.components.fabActions', ['material.core'])
19 .directive('mdFabActions', MdFabActionsDirective);
24 * @module material.components.fabActions
29 * The `<md-fab-actions>` directive is used inside of a `<md-fab-speed-dial>` or
30 * `<md-fab-toolbar>` directive to mark an element (or elements) as the actions and setup the
31 * proper event listeners.
34 * See the `<md-fab-speed-dial>` or `<md-fab-toolbar>` directives for example usage.
36 function MdFabActionsDirective($mdUtil) {
40 require: ['^?mdFabSpeedDial', '^?mdFabToolbar'],
42 compile: function(element, attributes) {
43 var children = element.children();
45 var hasNgRepeat = $mdUtil.prefixer().hasAttribute(children, 'ng-repeat');
47 // Support both ng-repeat and static content
49 children.addClass('md-fab-action-item');
51 // Wrap every child in a new div and add a class that we can scale/fling independently
52 children.wrap('<div class="md-fab-action-item">');
60 ngmaterial.components.fabActions = angular.module("material.components.fabActions");