1 |
|
2 |
|
3 |
|
4 |
|
5 | import { UrlMatcherFactory } from "./url/urlMatcherFactory";
|
6 | import { UrlRouter } from "./url/urlRouter";
|
7 | import { TransitionService } from "./transition/transitionService";
|
8 | import { ViewService } from "./view/view";
|
9 | import { StateRegistry } from "./state/stateRegistry";
|
10 | import { StateService } from "./state/stateService";
|
11 | import { UIRouterGlobals } from "./globals";
|
12 | import { UIRouterPlugin, Disposable } from "./interface";
|
13 | import { UrlService } from "./url/urlService";
|
14 | import { LocationServices, LocationConfig } from "./common/coreservices";
|
15 | import { Trace } from "./common/trace";
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare class UIRouter {
|
32 | locationService: LocationServices;
|
33 | locationConfig: LocationConfig;
|
34 | $id: number;
|
35 | _disposed: boolean;
|
36 | private _disposables;
|
37 |
|
38 | trace: Trace;
|
39 |
|
40 | viewService: ViewService;
|
41 |
|
42 | transitionService: TransitionService;
|
43 |
|
44 | globals: UIRouterGlobals;
|
45 | |
46 |
|
47 |
|
48 |
|
49 | urlMatcherFactory: UrlMatcherFactory;
|
50 | |
51 |
|
52 |
|
53 |
|
54 | urlRouter: UrlRouter;
|
55 |
|
56 | stateRegistry: StateRegistry;
|
57 |
|
58 | stateService: StateService;
|
59 |
|
60 | urlService: UrlService;
|
61 |
|
62 | disposable(disposable: Disposable): void;
|
63 | |
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | dispose(disposable?: any): void;
|
74 | |
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 | constructor(locationService?: LocationServices, locationConfig?: LocationConfig);
|
82 | /** @hidden */
|
83 | private _plugins;
|
84 | /** Add plugin (as ES6 class) */
|
85 | plugin<T extends UIRouterPlugin>(plugin: {
|
86 | new (router: UIRouter, options?: any): T;
|
87 | }, options?: any): T;
|
88 | /** Add plugin (as javascript constructor function) */
|
89 | plugin<T extends UIRouterPlugin>(plugin: {
|
90 | (router: UIRouter, options?: any): void;
|
91 | }, options?: any): T;
|
92 | /** Add plugin (as javascript factory function) */
|
93 | plugin<T extends UIRouterPlugin>(plugin: PluginFactory<T>, options?: any): T;
|
94 | /**
|
95 | * Returns registered plugins
|
96 | *
|
97 | * Returns the registered plugin of the given `pluginName`.
|
98 | * If no `pluginName` is given, returns all registered plugins
|
99 | *
|
100 | * @param pluginName (optional) the name of the plugin to get
|
101 | * @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)
|
102 | */
|
103 | getPlugin(pluginName: string): UIRouterPlugin;
|
104 | getPlugin(): UIRouterPlugin[];
|
105 | }
|
106 | /** @internalapi */
|
107 | export declare type PluginFactory<T> = (router: UIRouter, options?: any) => T;
|