Merge pull request #4083 from furinvader/refactoring/routing-config

Remove unnecessary type declarations in routing config
pull/4088/merge
Oliver Günther 9 years ago
commit 3308733a3b
  1. 21
      frontend/app/components/routing/routing.configuration.ts

@ -26,23 +26,9 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
// ++ // ++
interface LocationService extends angular.ILocationService {
$$rewrite(href: string): string;
$$parse(url: string): string;
}
interface BrowserService extends angular.IBrowserService {
url(): string;
}
interface WindowService extends angular.IWindowService {
angular: angular.IAngularStatic;
}
angular angular
.module('openproject') .module('openproject')
.config(($stateProvider: ng.ui.IStateProvider, $urlRouterProvider: ng.ui.IUrlRouterProvider, .config(($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) => {
$urlMatcherFactoryProvider: ng.ui.IUrlMatcherFactory) => {
$urlRouterProvider.when('/work_packages/', '/work_packages'); $urlRouterProvider.when('/work_packages/', '/work_packages');
$urlMatcherFactoryProvider.strictMode(false); $urlMatcherFactoryProvider.strictMode(false);
@ -203,10 +189,7 @@ angular
.state('work-packages.list.details.watchers', panels.watchers); .state('work-packages.list.details.watchers', panels.watchers);
}) })
.run(($location: LocationService, $rootElement: ng.IRootElementService, .run(($location, $rootElement, $browser, $rootScope, $state, $window) => {
$browser: BrowserService, $rootScope: ng.IRootScopeService, $state: ng.ui.IStateService,
$window: WindowService) => {
// Our application is still a hybrid one, meaning most routes are still // Our application is still a hybrid one, meaning most routes are still
// handled by Rails. As such, we disable the default link-hijacking that // handled by Rails. As such, we disable the default link-hijacking that
// Angular's HTML5-mode turns on. // Angular's HTML5-mode turns on.

Loading…
Cancel
Save