This repository has been archived on 2022-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
AriaNg/app/scripts/core/router.js

67 lines
2.5 KiB
JavaScript

(function () {
'use strict';
angular.module('ariaNg').config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/downloading', {
templateUrl: 'views/list.html',
controller: 'DownloadListController'
})
.when('/waiting', {
templateUrl: 'views/list.html',
controller: 'DownloadListController'
})
.when('/stopped', {
templateUrl: 'views/list.html',
controller: 'DownloadListController'
})
.when('/task/detail/:gid', {
templateUrl: 'views/task-detail.html',
controller: 'TaskDetailController'
})
.when('/settings/ariang', {
templateUrl: 'views/settings-ariang.html',
controller: 'AriaNgSettingsController'
})
.when('/settings/aria2/basic', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/http-ftp-sftp', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/http', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/ftp-sftp', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/bt', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/metalink', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/rpc', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/settings/aria2/advanced', {
templateUrl: 'views/settings-aria2.html',
controller: 'Aria2SettingsController'
})
.when('/status', {
templateUrl: 'views/status.html',
controller: 'Aria2StatusController'
})
.otherwise({
redirectTo: '/downloading'
});
}]);
})();