chore(docs): apply the anchorScroll offset feature to the docs app

Closes #9360
This commit is contained in:
Peter Bacon Darwin
2014-10-12 17:55:37 +01:00
parent 09c39d2ce6
commit 353de4f531
3 changed files with 7 additions and 3 deletions

View File

@@ -17,7 +17,6 @@ angular.module('docsApp', [
'ui.bootstrap.dropdown'
])
.config(['$locationProvider', function($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
}]);

View File

@@ -28,5 +28,10 @@ angular.module('directives', [])
element.html(window.prettyPrintOne(html, lang, linenums));
}
};
});
})
.directive('scrollYOffsetElement', ['$anchorScroll', function($anchorScroll) {
return function(scope, element) {
$anchorScroll.yOffset = element;
};
}]);

View File

@@ -70,7 +70,7 @@
</head>
<body>
<div id="wrapper">
<header class="header header-fixed">
<header scroll-y-offset-element class="header header-fixed">
<section class="navbar navbar-inverse docs-navbar-primary" ng-controller="DocsSearchCtrl">
<div class="container">
<div class="row">