blob: bc99a8e0ae6285acb92900b76c0bdbdef2ad3142 [file] [log] [blame]
Matteo Scandolof2c3ed62016-12-15 14:32:50 -08001import {IXosState} from '../../../index';
2export interface IRuntimeStatesService {
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -08003 addState(name: string, state: ng.ui.IState): void;
Matteo Scandolof2c3ed62016-12-15 14:32:50 -08004}
5
Matteo Scandoloe0d71ea2016-12-19 11:56:12 -08006export function RuntimeStates($stateProvider: ng.ui.IStateProvider): ng.IServiceProvider {
7 this.$get = function($state: ng.ui.IStateService) {
Matteo Scandolof2c3ed62016-12-15 14:32:50 -08008 return {
9 addState: function(name: string, state: IXosState) {
10 $stateProvider.state(name, state);
11 }
12 };
13 };
14 return this;
15}