bansho/app/components/sidebar/sidebar.js
2015-04-30 11:45:22 -04:00

23 lines
542 B
JavaScript

'use strict';
angular.module('bansho.sidebar', [])
.controller('SideBarCtrl', ['$scope', '$location', function ($scope, $location) {
$scope.getClass = function (path) {
var class_name = "";
if ($location.url() === path) {
class_name = "state--current";
}
return class_name;
};
}])
.directive('banshoSidebar', function () {
return {
restrict: 'E',
templateUrl: "components/sidebar/sidebar.html"
};
});