summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-06-02 00:49:36 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-06-02 00:49:36 +0200
commit1280da30fcca91fa1a07db70271393d3c4876369 (patch)
tree0e77e4db8123460b9e29b520eddcf09e9da975e1 /js/build/app.js
parentb5e4dd0ee565058c63d3df25fcebf352149e8158 (diff)
reload route if you click the path and the route is the same string
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/build/app.js b/js/build/app.js
index 81b92d4d0..31214d632 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -1635,6 +1635,24 @@ var $__build_47_app__ = function () {
});
};
});
+ app.directive('newsRouteReload', [
+ '$location',
+ '$route',
+ function ($location, $route) {
+ 'use strict';
+ return {
+ restrict: 'A',
+ scope: { 'ngHref': '@' },
+ link: function (scope, elem, attrs) {
+ elem.click(function () {
+ if ($location.path() === attrs.ngHref.substring(1)) {
+ $route.reload();
+ }
+ });
+ }
+ };
+ }
+ ]);
app.directive('newsScroll', [
'$timeout',
function ($timeout) {