From e418d21d31840f2f5c8ada42dbdf34184507cc39 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Thu, 24 Oct 2013 23:56:08 -0400 Subject: [PATCH] Fix the header links when we're on a non-angular page. --- static/js/controllers.js | 9 ++++++++- static/partials/header.html | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index dc7552eb3..b0e1f315e 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -62,7 +62,14 @@ function HeaderCtrl($scope, $location, UserService, Restangular) { UserService.load(); $location.path('/'); }); - } + }; + + $scope.appLinkTarget = function() { + if ($("div[ng-view]").length === 0) { + return "_self"; + } + return ""; + }; $scope.$on('$includeContentLoaded', function() { // THIS IS BAD, MOVE THIS TO A DIRECTIVE diff --git a/static/partials/header.html b/static/partials/header.html index a80b3d5d3..264fcbfec 100644 --- a/static/partials/header.html +++ b/static/partials/header.html @@ -14,9 +14,9 @@