fix(app): ensure headings are visible when navigating to in-page anchors
Closes #477
This commit is contained in:
parent
6dc9e5d10b
commit
a6ca213866
|
@ -1,4 +1,4 @@
|
|||
md-toolbar(class="main-nav background-regal l-pinned-top l-layer-5")
|
||||
md-toolbar(class="main-nav background-regal l-pinned-top l-layer-5",scroll-y-offset-element)
|
||||
nav
|
||||
h1 <a href="/" md-button>Angular <sup>by Google</sup></a>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ script(src="/resources/js/vendor/lodash.js")
|
|||
|
||||
|
||||
<!-- Angular Material Dependencies -->
|
||||
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js")
|
||||
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js")
|
||||
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js")
|
||||
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js")
|
||||
script(src="https://ajax.googleapis.com/ajax/libs/angular_material/0.8.3/angular-material.min.js")
|
||||
|
@ -24,6 +24,7 @@ script(src="/resources/js/directives/code.js")
|
|||
script(src="/resources/js/directives/code-tabs.js")
|
||||
script(src="/resources/js/directives/code-pane.js")
|
||||
script(src="/resources/js/directives/code-example.js")
|
||||
script(src="/resources/js/directives/scroll-y-offset-element.js")
|
||||
|
||||
|
||||
<!-- GA -->
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
angularIO.directive('scrollYOffsetElement', ['$anchorScroll', function($anchorScroll) {
|
||||
return function(scope, element) {
|
||||
$anchorScroll.yOffset = element;
|
||||
};
|
||||
}]);
|
|
@ -19,4 +19,8 @@ var angularIO = angular.module('angularIOApp', ['ngMaterial'])
|
|||
.accentPalette('purple', {
|
||||
'default': '200' // use shade 200 for default, and keep all other shades the same
|
||||
});
|
||||
})
|
||||
|
||||
.config(function($locationProvider) {
|
||||
$locationProvider.hashPrefix('!');
|
||||
});
|
Loading…
Reference in New Issue