Skip to content

Instantly share code, notes, and snippets.

View maragh's full-sized avatar
🏠
Working from the office

Jermaine Maragh maragh

🏠
Working from the office
View GitHub Profile
@maragh
maragh / angular-directive-navmenu.js
Created September 23, 2015 20:40 — forked from edy/angular-directive-navmenu.js
AngularJS directive to mark navigation menu items as active
'use strict';
// <ul nav-menu="active">
// <li><a href="/one">Page One</a></li>
// <li><a href="/two">Page Two</a></li>
// <li><a href="/three">Page Three</a></li>
// </ul>
app.directive('navMenu', function($location) {
return function(scope, element, attrs) {