Sha256: 37efb69cdbbcde6744ac63ee103941b8013a8f1febf243a902f07b749205fa73
Contents?: true
Size: 788 Bytes
Versions: 13
Compression:
Stored size: 788 Bytes
Contents
SidebarController = ($scope, $cookieStore) -> #* Sidebar Toggle & Cookie Control mobileView = 992 $scope.getWidth = -> return window.innerWidth $scope.$watch $scope.getWidth, (newValue, oldValue)-> if newValue >= mobileView if angular.isDefined($cookieStore.get('toggle')) if $cookieStore.get('toggle') == false $scope.toggle = false else $scope.toggle = true else $scope.toggle = true else $scope.toggle = false $scope.toggleSidebar = -> $scope.toggle = ! $scope.toggle $cookieStore.put('toggle', $scope.toggle) window.onresize = -> $scope.$apply() angular.module('KMS') .controller('SidebarController', ['$scope', '$cookieStore', SidebarController])
Version data entries
13 entries across 13 versions & 1 rubygems