Before when not using Typescript I was adding my ui-router state information like this:
app.config([
\'$httpProvider\',
\'$locationProvider\',
\'$sce
This is the way I am defining the ui-router
states .. in typescript (as other parts are in TS...):
module MyModule
{
export class MyConfig
{
constructor(private $stateProvider: ng.ui.IStateProvider
, private $urlRouterProvider: ng.ui.IUrlRouterProvider
... // other dependencies)
{
this.init();
}
private init(): void
{
this.$stateProvider.state("App",
{
abstract: true,
.... // more settings
});
// more states
}
}
}
angular.module('MyModule')
.config(
["$stateProvider", "$urlRouterProvider", // more dependencies
($stateProvider, $urlRouterProvider) =>
{
return new MyModule.MyConfig($stateProvider, $urlRouterProvider);
}
]);