mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
25 lines
621 B
JavaScript
25 lines
621 B
JavaScript
module.exports =
|
|
function DocsCtrl($rootScope, $scope, $window, $location) {
|
|
|
|
function hasHistory() {
|
|
return $window.history.length > 1
|
|
}
|
|
|
|
$scope.hasHistory = hasHistory()
|
|
|
|
$scope.goBack = function () {
|
|
$window.history.back()
|
|
}
|
|
|
|
$scope.goHome = function () {
|
|
$location.path('/docs/Help')
|
|
}
|
|
|
|
$rootScope.$on("$routeChangeError",
|
|
function (event, current, previous, rejection) {
|
|
console.log("ROUTE CHANGE ERROR: " + rejection)
|
|
console.log('event', event)
|
|
console.log('current', current)
|
|
console.log('previous', previous)
|
|
})
|
|
}
|