mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 23:41:23 -03:30
* Faster build times * Smaller bundle sizes * Adjust paths * Cleanup npm dependencies * Remove unneded Grunt tasks
33 lines
650 B
JavaScript
33 lines
650 B
JavaScript
const templateUrl = require('@components/layout/side-nav.partial.html');
|
|
|
|
function atSideNavLink (scope, element, attrs, ctrl) {
|
|
scope.layoutVm = ctrl;
|
|
}
|
|
|
|
function AtSideNavController () {
|
|
let vm = this || {};
|
|
|
|
vm.isExpanded = true;
|
|
|
|
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;
|