1 | import { UrlMatcher } from './urlMatcher';
|
2 | import { Param, ParamType, ParamTypeDefinition } from '../params';
|
3 | import { UrlMatcherCompileConfig } from './interface';
|
4 | import { StateDeclaration } from '../state';
|
5 | import { UIRouter } from '../router';
|
6 | export declare class ParamFactory {
|
7 | private router;
|
8 | fromConfig(id: string, type: ParamType, state: StateDeclaration): Param;
|
9 | fromPath(id: string, type: ParamType, state: StateDeclaration): Param;
|
10 | fromSearch(id: string, type: ParamType, state: StateDeclaration): Param;
|
11 | constructor(router: UIRouter);
|
12 | }
|
13 | /**
|
14 | * Factory for [[UrlMatcher]] instances.
|
15 | *
|
16 | * The factory is available to ng1 services as
|
17 | * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`.
|
18 | */
|
19 | export declare class UrlMatcherFactory {
|
20 | private router;
|
21 |
|
22 | paramFactory: ParamFactory;
|
23 | UrlMatcher: typeof UrlMatcher;
|
24 | Param: typeof Param;
|
25 | constructor( router: UIRouter);
|
26 | /**
|
27 | * Creates a [[UrlMatcher]] for the specified pattern.
|
28 | *
|
29 | * @param pattern The URL pattern.
|
30 | * @param config The config object hash.
|
31 | * @returns The UrlMatcher.
|
32 | */
|
33 | compile(pattern: string, config?: UrlMatcherCompileConfig): UrlMatcher;
|
34 | /**
|
35 | * Returns true if the specified object is a [[UrlMatcher]], or false otherwise.
|
36 | *
|
37 | * @param object The object to perform the type check against.
|
38 | * @returns `true` if the object matches the `UrlMatcher` interface, by
|
39 | * implementing all the same methods.
|
40 | */
|
41 | isMatcher(object: any): boolean;
|
42 | /** @internal */
|
43 | $get(): this;
|
44 | /** @deprecated use [[UrlConfig.caseInsensitive]] */
|
45 | caseInsensitive: (value?: boolean) => boolean;
|
46 | /** @deprecated use [[UrlConfig.defaultSquashPolicy]] */
|
47 | defaultSquashPolicy: (value?: boolean | string) => string | boolean;
|
48 | /** @deprecated use [[UrlConfig.strictMode]] */
|
49 | strictMode: (value?: boolean) => boolean;
|
50 | /** @deprecated use [[UrlConfig.type]] */
|
51 | type: (name: string, definition?: ParamTypeDefinition, definitionFn?: () => ParamTypeDefinition) => any;
|
52 | }
|