Created
August 9, 2013 17:48
-
-
Save lefnire/6195589 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/index.html b/app/index.html | |
index 5248348..d6ee686 100644 | |
--- a/app/index.html | |
+++ b/app/index.html | |
@@ -31,7 +31,7 @@ | |
<nav class="menu" ng-class="{open : menuopen}" style="top:0; left:0; width:100%"> | |
<div class="navLinkBlock"> | |
- <a class="mainNavLink" ng-repeat="button in nav" ng-click="menuopen != menuopen" href="#{{button.link}}">{{button.name}}</a> | |
+ <a class="mainNavLink" ng-repeat="button in nav" ng-click="menuClick(button)">{{button.name}}</a> | |
</div> | |
</nav> | |
diff --git a/app/scripts/controllers/menuCtrl.js b/app/scripts/controllers/menuCtrl.js | |
index d933951..dd0f6d1 100644 | |
--- a/app/scripts/controllers/menuCtrl.js | |
+++ b/app/scripts/controllers/menuCtrl.js | |
@@ -10,6 +10,11 @@ habitrpg.controller('MenuCtrl', | |
['$scope', '$rootScope', '$location', | |
function($scope, $rootScope, $location) { | |
+ $scope.menuClick = function(button) { | |
+ $rootScope.menuopen != $rootScope.menuopen; | |
+ $location.url(button.link); | |
+ } | |
+ | |
$scope.swiperight = function(){ | |
$rootScope.menuopen = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment