(function () { 'use strict'; /*global define, module, exports, require */ /* istanbul ignore next */ var angular = window.angular ? window.angular : 'undefined' !== typeof require ? require('angular') : undefined; var circular = angular.module('angularCircularNavigation', []) .directive('circular', ['$compile', function ($compile) { return { restrict: 'EA', scope: { options: '=' }, template: '' + '
', controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) { $scope.toggleMenu = function () { $scope.options.isOpen = !$scope.options.isOpen; }; $scope.perform = function (options, item) { if (typeof item.onclick === 'function') { item.onclick(options, item); } if ($scope.options.toggleOnClick) { $scope.toggleMenu(); } }; } ] }; }]); /* istanbul ignore next */ if (typeof define === 'function' && define.amd) { define('circular', ['angular'], circular); } else if ('undefined' !== typeof exports && 'undefined' !== typeof module) { module.exports = circular; } })();