/** 
* @version 0.0.0
* I just made this so that there would be a reusable module
* @license MIT
*/
(function (ng, undefined){
  'use strict';
  ng.module('Sitenav', [])
  .controller('MenuCtrl', ['$scope', '$location', function($scope, $location){

    $scope.getClass = function(path) {
      console.log('path', path);
        /*
         * Match the given path to the current location
         */
        //test the index route first, as it will match all routes
        
        if ($location.path() !== '/' && path === '/') {
          return '';
        }
        else if ($location.path().substr(0, path.length) === path) {
          return 'active';
        }
        else {
          return '';
        }
        
    };

  }]);

})(angular);
