aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/src/templates/index.html2
-rw-r--r--docs/src/templates/js/docs.js15
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index 43c9e858..3d64a4f5 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -364,7 +364,7 @@
<footer class="footer">
<div class="container">
- <p class="pull-right"><a href="#">Back to top</a></p>
+ <p class="pull-right"><a back-to-top href="#">Back to top</a></p>
<p>
Super-powered by Google ©2010-2012
diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js
index 06cb91c2..6231c59d 100644
--- a/docs/src/templates/js/docs.js
+++ b/docs/src/templates/js/docs.js
@@ -372,6 +372,21 @@ docsApp.directive.errorDisplay = ['$location', 'errorLinkFilter', function ($loc
}];
+/**
+ * backToTop Directive
+ * @param {Function} $anchorScroll
+ *
+ * @description Ensure that the browser scrolls when the anchor is clicked
+ */
+docsApp.directive.backToTop = ['$anchorScroll', function($anchorScroll) {
+ return function link(scope, element) {
+ element.on('click', function(event) {
+ scope.$apply($anchorScroll);
+ });
+ };
+}];
+
+
docsApp.serviceFactory.angularUrls = function($document) {
var urls = {};