Show setupLink properly

This commit is contained in:
Johannes Zellner
2016-04-04 18:35:38 +02:00
parent 5afb16aa98
commit 9fbbddc3eb
2 changed files with 18 additions and 3 deletions

View File

@@ -241,4 +241,19 @@ app.run(['$route', '$rootScope', '$location', function ($route, $rootScope, $loc
}
return original.apply($location, [path]);
};
}]);
}]);
app.directive('ngClickSelect', function () {
return {
restrict: 'AC',
link: function (scope, element, attrs) {
element.bind('click', function () {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(this);
selection.removeAllRanges();
selection.addRange(range);
});
}
};
});