mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-09 01:21:49 -05:00
33 lines
654 B
JavaScript
33 lines
654 B
JavaScript
const templateUrl = require('~components/layout/side-nav.partial.html');
|
|
|
|
function atSideNavLink (scope, element, attrs, ctrl) {
|
|
scope.layoutVm = ctrl;
|
|
}
|
|
|
|
function AtSideNavController () {
|
|
const vm = this || {};
|
|
|
|
vm.isExpanded = false;
|
|
|
|
vm.toggleExpansion = () => {
|
|
vm.isExpanded = !vm.isExpanded;
|
|
};
|
|
}
|
|
|
|
function atSideNav () {
|
|
return {
|
|
restrict: 'E',
|
|
replace: true,
|
|
require: '^^atLayout',
|
|
controller: AtSideNavController,
|
|
controllerAs: 'vm',
|
|
link: atSideNavLink,
|
|
transclude: true,
|
|
templateUrl,
|
|
scope: {
|
|
}
|
|
};
|
|
}
|
|
|
|
export default atSideNav;
|