diff --git a/public/_includes/_main-nav.jade b/public/_includes/_main-nav.jade index 668a897982..1ce5d5e46a 100644 --- a/public/_includes/_main-nav.jade +++ b/public/_includes/_main-nav.jade @@ -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 Angular by Google diff --git a/public/_includes/_scripts-include.jade b/public/_includes/_scripts-include.jade index e41bf8f3c7..f474f7f4fe 100644 --- a/public/_includes/_scripts-include.jade +++ b/public/_includes/_scripts-include.jade @@ -6,7 +6,7 @@ script(src="/resources/js/vendor/lodash.js") -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") diff --git a/public/resources/js/directives/scroll-y-offset-element.js b/public/resources/js/directives/scroll-y-offset-element.js new file mode 100644 index 0000000000..3dcd055755 --- /dev/null +++ b/public/resources/js/directives/scroll-y-offset-element.js @@ -0,0 +1,5 @@ +angularIO.directive('scrollYOffsetElement', ['$anchorScroll', function($anchorScroll) { + return function(scope, element) { + $anchorScroll.yOffset = element; + }; +}]); \ No newline at end of file diff --git a/public/resources/js/site.js b/public/resources/js/site.js index 335c0f66b9..51f5a50732 100644 --- a/public/resources/js/site.js +++ b/public/resources/js/site.js @@ -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('!'); }); \ No newline at end of file