Skip to content

Instantly share code, notes, and snippets.

@jsgandalf
jsgandalf / gist:a6cd7b73f1a3c6287e36
Last active August 29, 2015 14:05
AngularJS navbar directive
'use strict';
angular.module( 'navigation',[] ).directive( 'tasktracNavbar', function () {
return {
restrict: 'E', // allow as an element; the default is only an attribute
replace: true,
templateUrl: '/components/navbar/navbar.html', // load the template file
controller: function ($rootScope, $scope, $location, Auth) {
$scope.toggleCollapsed = function(){