mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-05 08:59:35 +08:00
24 lines
675 B
JavaScript
24 lines
675 B
JavaScript
angular.module('docsApp.navigationService', [])
|
|
|
|
.factory('navigationService', function($window) {
|
|
var service = {
|
|
currentPage: null,
|
|
currentVersion: null,
|
|
changePage: function(newPage) {
|
|
|
|
},
|
|
changeVersion: function(newVersion) {
|
|
|
|
//TODO =========
|
|
// var currentPagePath = '';
|
|
|
|
// // 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;
|
|
// }
|
|
|
|
// $window.location = version.url + currentPagePath;
|
|
|
|
}
|
|
};
|
|
}); |