Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(versions): preserve URL path. Fixes #4661 #5773

Closed
wants to merge 1 commit into from

Conversation

sebholstein
Copy link
Contributor

Preserve URL path when switching between doc versions. Fixes #4661

Preserve URL path when switching between doc versions. Fixes angular#4661
@ghost ghost assigned jeffbcross and IgorMinar Jan 14, 2014

// preserve URL path when switching between doc versions
if (angular.isObject($rootScope.currentPage) && $rootScope.currentPage.section && $rootScope.currentPage.id) {
currentPagePath = '/' + $rootScope.currentPage.section + '/' + $rootScope.currentPage.id;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use $location.path()?

@ghost ghost assigned petebacondarwin Jan 14, 2014
@IgorMinar
Copy link
Contributor

@petebacondarwin can you merge this please when it's ready?

we should preserve this behavior in bike-shed as well.

@petebacondarwin
Copy link
Contributor

Will do but of course this will only work on current and future versions. As soon as you navigate to an older version you will lose this facility.

@sebholstein sebholstein deleted the docs-preserve-url branch January 15, 2014 18:42
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Preserve URL path when switching between doc versions.

Closes angular#4661
Closes angular#5773
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Preserve URL path when switching between doc versions.

Closes angular#4661
Closes angular#5773
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(docs) preserve URL path when switching between doc versions
4 participants