mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 15:53:23 +02:00
27 lines
650 B
JavaScript
27 lines
650 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')
|
|
}
|
|
|
|
/* eslint no-console:0 */
|
|
$rootScope.$on('$routeChangeError',
|
|
function(event, current, previous, rejection) {
|
|
console.error('ROUTE CHANGE ERROR: ' + rejection)
|
|
console.log('event', event)
|
|
console.log('current', current)
|
|
console.log('previous', previous)
|
|
})
|
|
}
|