@angular-wave/angular.ts 0.0.38 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/Makefile +6 -5
  2. package/dist/angular-ts.esm.js +2 -1
  3. package/dist/angular-ts.umd.js +1 -1
  4. package/package.json +2 -4
  5. package/rollup.config.js +5 -1
  6. package/src/core/scope/scope.js +4 -7
  7. package/src/index.js +307 -1
  8. package/src/loader.js +13 -6
  9. package/src/public.js +7 -2
  10. package/src/src.test.js +10 -0
  11. package/tsconfig.json +1 -1
  12. package/tsconfig.types.json +11 -0
  13. package/types/animations/animate-cache.d.ts +7 -7
  14. package/types/animations/animate-children-directive.d.ts +3 -6
  15. package/types/animations/animate-swap.d.ts +7 -16
  16. package/types/animations/animation.d.ts +2 -11
  17. package/types/animations/raf-scheduler.d.ts +3 -3
  18. package/types/animations/shared.d.ts +8 -23
  19. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  20. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  21. package/types/core/compile/compile.d.ts +173 -0
  22. package/types/core/controller/controller.d.ts +32 -0
  23. package/types/core/exception-handler.d.ts +1 -1
  24. package/types/core/filter/filter.d.ts +9 -0
  25. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  26. package/types/core/interval/interval-factory.d.ts +4 -0
  27. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  28. package/types/core/location/location.d.ts +209 -0
  29. package/types/core/pubsub/pubsub.d.ts +156 -0
  30. package/types/core/q/q.d.ts +31 -0
  31. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  32. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  33. package/types/core/scope/scope.d.ts +727 -0
  34. package/types/core/task-tracker-factory.d.ts +29 -29
  35. package/types/core/timeout/timeout.d.ts +20 -0
  36. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  37. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  38. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  39. package/types/directive/controller/controller.d.ts +6 -0
  40. package/types/directive/events/events.d.ts +5 -0
  41. package/types/directive/form/form.d.ts +200 -0
  42. package/types/directive/if/if.d.ts +8 -0
  43. package/types/directive/include/include.d.ts +14 -0
  44. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  45. package/types/directive/{model.d.ts → model/model.d.ts} +256 -279
  46. package/types/directive/options/options.d.ts +9 -0
  47. package/types/directive/ref/ref.d.ts +5 -0
  48. package/types/directive/repeat/repeat.d.ts +8 -0
  49. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  50. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  51. package/types/directive/switch/switch.d.ts +17 -0
  52. package/types/directive/transclude/transclude.d.ts +4 -0
  53. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  54. package/types/filters/filters.d.ts +10 -16
  55. package/types/filters/order-by.d.ts +2 -4
  56. package/types/index.d.ts +117 -0
  57. package/types/injector.d.ts +12 -0
  58. package/types/public.d.ts +5 -0
  59. package/types/router/common/coreservices.d.ts +2 -2
  60. package/types/router/common/glob.d.ts +9 -9
  61. package/types/router/common/queue.d.ts +13 -13
  62. package/types/router/common/trace.d.ts +43 -43
  63. package/types/router/directives/view-directive.d.ts +13 -32
  64. package/types/router/globals.d.ts +20 -20
  65. package/types/router/hooks/lazy-load.d.ts +2 -11
  66. package/types/router/hooks/redirect-to.d.ts +1 -4
  67. package/types/router/hooks/url.d.ts +1 -5
  68. package/types/router/hooks/views.d.ts +1 -4
  69. package/types/router/params/param-factory.d.ts +5 -5
  70. package/types/router/params/param-type.d.ts +35 -35
  71. package/types/router/params/param-types.d.ts +11 -11
  72. package/types/router/params/param.d.ts +38 -38
  73. package/types/router/params/state-params.d.ts +10 -10
  74. package/types/router/path/path-node.d.ts +34 -34
  75. package/types/router/path/path-utils.d.ts +73 -77
  76. package/types/router/resolve/resolvable.d.ts +32 -32
  77. package/types/router/resolve/resolve-context.d.ts +84 -84
  78. package/types/router/services.d.ts +4 -9
  79. package/types/router/state/state-builder.d.ts +27 -27
  80. package/types/router/state/state-matcher.d.ts +5 -5
  81. package/types/router/state/state-object.d.ts +58 -58
  82. package/types/router/state/state-queue-manager.d.ts +10 -16
  83. package/types/router/state/state-registry.d.ts +100 -107
  84. package/types/router/state/state-service.d.ts +411 -411
  85. package/types/router/state/target-state.d.ts +64 -69
  86. package/types/router/state/views.d.ts +31 -37
  87. package/types/router/state-filters.d.ts +7 -7
  88. package/types/router/state-provider.d.ts +105 -105
  89. package/types/router/template-factory.d.ts +83 -112
  90. package/types/router/transition/hook-builder.d.ts +25 -25
  91. package/types/router/transition/hook-registry.d.ts +68 -83
  92. package/types/router/transition/interface.d.ts +7 -7
  93. package/types/router/transition/reject-factory.d.ts +34 -34
  94. package/types/router/transition/transition-event-type.d.ts +9 -18
  95. package/types/router/transition/transition-hook.d.ts +77 -82
  96. package/types/router/transition/transition-service.d.ts +82 -99
  97. package/types/router/transition/transition.d.ts +369 -377
  98. package/types/router/url/url-config.d.ts +84 -84
  99. package/types/router/url/url-matcher.d.ts +115 -119
  100. package/types/router/url/url-rule.d.ts +114 -124
  101. package/types/router/url/url-rules.d.ts +217 -217
  102. package/types/router/url/url-service.d.ts +264 -269
  103. package/types/router/view/view.d.ts +114 -117
  104. package/types/router/view-scroll.d.ts +2 -2
  105. package/types/services/anchor-scroll.d.ts +2 -8
  106. package/types/services/browser.d.ts +122 -130
  107. package/types/services/cache-factory.d.ts +25 -25
  108. package/types/services/cookie-reader.d.ts +2 -2
  109. package/types/services/document.d.ts +2 -2
  110. package/types/services/http/http.d.ts +145 -0
  111. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  112. package/types/services/log.d.ts +49 -49
  113. package/types/services/template-request.d.ts +44 -53
  114. package/types/shared/common.d.ts +4 -19
  115. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  116. package/types/shared/hof.d.ts +1 -1
  117. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +11 -11
  118. package/types/shared/test-utils.d.ts +11 -0
  119. package/types/shared/utils.d.ts +7 -24
  120. package/types-back/global.d.ts +3 -1
  121. package/types-back/index.d.ts +2 -221
  122. package/types/core/compile.d.ts +0 -206
  123. package/types/core/controller.d.ts +0 -42
  124. package/types/core/filter.d.ts +0 -9
  125. package/types/core/interval-factory.d.ts +0 -21
  126. package/types/core/location.d.ts +0 -234
  127. package/types/core/pubsub.d.ts +0 -164
  128. package/types/core/q.d.ts +0 -33
  129. package/types/core/root-scope.d.ts +0 -754
  130. package/types/core/sanitize-uri.d.ts +0 -57
  131. package/types/core/timeout.d.ts +0 -31
  132. package/types/directive/controller.d.ts +0 -6
  133. package/types/directive/events.d.ts +0 -12
  134. package/types/directive/form.d.ts +0 -230
  135. package/types/directive/if.d.ts +0 -17
  136. package/types/directive/include.d.ts +0 -33
  137. package/types/directive/options.d.ts +0 -16
  138. package/types/directive/ref.d.ts +0 -11
  139. package/types/directive/repeat.d.ts +0 -23
  140. package/types/directive/switch.d.ts +0 -23
  141. package/types/directive/transclude.d.ts +0 -15
  142. package/types/services/http.d.ts +0 -157
  143. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  144. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  145. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  146. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  147. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  148. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  149. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  150. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  151. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -17,9 +17,9 @@ export const EXPANDO: "ngId";
17
17
  */
18
18
  export const CACHE: Map<number, ExpandoStore>;
19
19
  export type ExpandoStore = {
20
- data: {
21
- [x: string]: any;
22
- };
23
- events: any;
24
- handle: Function | null;
20
+ data: {
21
+ [x: string]: any;
22
+ };
23
+ events: any;
24
+ handle: Function | null;
25
25
  };
@@ -0,0 +1,173 @@
1
+ export function $CompileProvider($provide: any, $$sanitizeUriProvider: any): void;
2
+ export class $CompileProvider {
3
+ constructor($provide: any, $$sanitizeUriProvider: any);
4
+ /**
5
+ * @ngdoc method
6
+ * @name $compileProvider#directive
7
+ * @kind function
8
+ *
9
+ * @description
10
+ * Register a new directive with the compiler.
11
+ *
12
+ * @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match
13
+ * as `ng-bind`), or an object map of directives where the keys are the names and the values
14
+ * are the factories.
15
+ * @param {Function|Array} directiveFactory An injectable directive factory function. See the
16
+ * {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
17
+ * @returns {ng.ICompileProvider} Self for chaining.
18
+ */
19
+ directive: (name: string | any, directiveFactory: Function | any[]) => ng.ICompileProvider;
20
+ /**
21
+ * @ngdoc method
22
+ * @name $compileProvider#component
23
+ * @module ng
24
+ * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
25
+ * or an object map of components where the keys are the names and the values are the component definition objects.
26
+ * @param {Object} options Component definition object (a simplified
27
+ * {@link ng.$compile#directive-definition-object directive definition object}),
28
+ * with the following properties (all optional):
29
+ *
30
+ * - `controller` – `{(string|function()=}` – controller constructor function that should be
31
+ * associated with newly created scope or the name of a {@link ng.$compile#-controller-
32
+ * registered controller} if passed as a string. An empty `noop` function by default.
33
+ * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.
34
+ * If present, the controller will be published to scope under the `controllerAs` name.
35
+ * If not present, this will default to be `$ctrl`.
36
+ * - `template` – `{string=|function()=}` – html template as a string or a function that
37
+ * returns an html template as a string which should be used as the contents of this component.
38
+ * Empty string by default.
39
+ *
40
+ * If `template` is a function, then it is {@link auto.$injector#invoke injected} with
41
+ * the following locals:
42
+ *
43
+ * - `$element` - Current element
44
+ * - `$attrs` - Current attributes object for the element
45
+ *
46
+ * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
47
+ * template that should be used as the contents of this component.
48
+ *
49
+ * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with
50
+ * the following locals:
51
+ *
52
+ * - `$element` - Current element
53
+ * - `$attrs` - Current attributes object for the element
54
+ *
55
+ * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.
56
+ * Component properties are always bound to the component controller and not to the scope.
57
+ * See {@link ng.$compile#-bindtocontroller- `bindToController`}.
58
+ * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.
59
+ * Disabled by default.
60
+ * - `require` - `{Object<string, string>=}` - requires the controllers of other directives and binds them to
61
+ * this component's controller. The object keys specify the property names under which the required
62
+ * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}.
63
+ * - `$...` – additional properties to attach to the directive factory function and the controller
64
+ * constructor function. (This is used by the component router to annotate)
65
+ *
66
+ * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.
67
+ * @description
68
+ * Register a **component definition** with the compiler. This is a shorthand for registering a special
69
+ * type of directive, which represents a self-contained UI component in your application. Such components
70
+ * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).
71
+ *
72
+ * Component definitions are very simple and do not require as much configuration as defining general
73
+ * directives. Component definitions usually consist only of a template and a controller backing it.
74
+ *
75
+ * In order to make the definition easier, components enforce best practices like use of `controllerAs`,
76
+ * `bindToController`. They always have **isolate scope** and are restricted to elements.
77
+ *
78
+ * Here are a few examples of how you would usually define components:
79
+ *
80
+ * ```js
81
+ * let myMod = angular.module(...);
82
+ * myMod.component('myComp', {
83
+ * template: '<div>My name is {{$ctrl.name}}</div>',
84
+ * controller: function() {
85
+ * this.name = 'shahar';
86
+ * }
87
+ * });
88
+ *
89
+ * myMod.component('myComp', {
90
+ * template: '<div>My name is {{$ctrl.name}}</div>',
91
+ * bindings: {name: '@'}
92
+ * });
93
+ *
94
+ * myMod.component('myComp', {
95
+ * templateUrl: 'views/my-comp.html',
96
+ * controller: 'MyCtrl',
97
+ * controllerAs: 'ctrl',
98
+ * bindings: {name: '@'}
99
+ * });
100
+ *
101
+ * ```
102
+ * For more examples, and an in-depth guide, see the {@link guide/component component guide}.
103
+ *
104
+ * <br />
105
+ * See also {@link ng.$compileProvider#directive $compileProvider.directive()}.
106
+ */
107
+ component: (name: string | any, options: any) => ng.$compileProvider;
108
+ /**
109
+ * @ngdoc method
110
+ * @name $compileProvider#aHrefSanitizationTrustedUrlList
111
+ * @kind function
112
+ *
113
+ * @description
114
+ * Retrieves or overrides the default regular expression that is used for determining trusted safe
115
+ * urls during a[href] sanitization.
116
+ *
117
+ * The sanitization is a security measure aimed at preventing XSS attacks via html links.
118
+ *
119
+ * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
120
+ * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationTrustedUrlList`
121
+ * regular expression. If a match is found, the original url is written into the dom. Otherwise,
122
+ * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
123
+ *
124
+ * @param {RegExp=} regexp New regexp to trust urls with.
125
+ * @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
126
+ * chaining otherwise.
127
+ */
128
+ aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
129
+ /**
130
+ * @ngdoc method
131
+ * @name $compileProvider#imgSrcSanitizationTrustedUrlList
132
+ * @kind function
133
+ *
134
+ * @description
135
+ * Retrieves or overrides the default regular expression that is used for determining trusted safe
136
+ * urls during img[src] sanitization.
137
+ *
138
+ * The sanitization is a security measure aimed at prevent XSS attacks via html links.
139
+ *
140
+ * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
141
+ * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationTrustedUrlList`
142
+ * regular expression. If a match is found, the original url is written into the dom. Otherwise,
143
+ * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
144
+ *
145
+ * @param {RegExp=} regexp New regexp to trust urls with.
146
+ * @returns {RegExp|ng.ICompileProvider} Current RegExp if called without value or self for
147
+ * chaining otherwise.
148
+ */
149
+ imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | ng.ICompileProvider;
150
+ debugInfoEnabled: (enabled: any) => boolean | this;
151
+ strictComponentBindingsEnabled: (enabled: any) => boolean | this;
152
+ /**
153
+ * @ngdoc method
154
+ * @name $compileProvider#addPropertySecurityContext
155
+ * @description
156
+ *
157
+ * Defines the security context for DOM properties bound by ng-prop-*.
158
+ *
159
+ * @param {string} elementName The element name or '*' to match any element.
160
+ * @param {string} propertyName The DOM property name.
161
+ * @param {string} ctx The {@link $sce} security context in which this value is safe for use, e.g. `$sce.URL`
162
+ * @returns {object} `this` for chaining
163
+ */
164
+ addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
165
+ $get: (string | (($injector: any, $interpolate: any, $exceptionHandler: any, $templateRequest: any, $parse: any, $controller: any, $rootScope: any, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => any))[];
166
+ }
167
+ export namespace $CompileProvider {
168
+ let $inject: string[];
169
+ }
170
+ /**
171
+ * Function that aggregates all linking fns for a compilation root (nodeList)
172
+ */
173
+ export type CompositeLinkFn = Function;
@@ -0,0 +1,32 @@
1
+ export function identifierForController(controller: any, ident: any): any;
2
+ /**
3
+ * @ngdoc provider
4
+ * @name $controllerProvider
5
+ *
6
+ *
7
+ * @description
8
+ * The {@link ng.$controller $controller service} is used by AngularJS to create new
9
+ * controllers.
10
+ *
11
+ * This provider allows controller registration via the
12
+ * {@link ng.$controllerProvider#register register} method.
13
+ */
14
+ export function $ControllerProvider(): void;
15
+ export class $ControllerProvider {
16
+ /**
17
+ * @ngdoc method
18
+ * @name $controllerProvider#has
19
+ * @param {string} name Controller name to check.
20
+ */
21
+ has: (name: string) => any;
22
+ /**
23
+ * @ngdoc method
24
+ * @name $controllerProvider#register
25
+ * @param {string|Object} name Controller name, or an object map of controllers where the keys are
26
+ * the names and the values are the constructors.
27
+ * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
28
+ * annotations in the array notation).
29
+ */
30
+ register: (name: string | any, constructor: Function | any[]) => void;
31
+ $get: (string | (($injector: any) => (expression: Function | string, locals: any, later: any, ident: any) => any))[];
32
+ }
@@ -42,5 +42,5 @@
42
42
  */
43
43
  export function $ExceptionHandlerProvider(): void;
44
44
  export class $ExceptionHandlerProvider {
45
- $get: (string | (($log: any) => (...args: any[]) => void))[];
45
+ $get: (string | (($log: any) => (...args: any[]) => void))[];
46
46
  }
@@ -0,0 +1,9 @@
1
+ export function $FilterProvider($provide: any): void;
2
+ export class $FilterProvider {
3
+ constructor($provide: any);
4
+ register: (name: any, factory: any) => any;
5
+ $get: (string | (($injector: any) => (name: any) => any))[];
6
+ }
7
+ export namespace $FilterProvider {
8
+ let $inject: string[];
9
+ }
@@ -17,43 +17,28 @@
17
17
  */
18
18
  export function $InterpolateProvider(): void;
19
19
  export class $InterpolateProvider {
20
- /**
21
- * @ngdoc method
22
- * @name $interpolateProvider#startSymbol
23
- * @description
24
- * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
25
- *
26
- * @param {string=} value new value to set the starting symbol to.
27
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
28
- */
29
- startSymbol: (
30
- value?: string | undefined,
31
- ) => string | (Window & typeof globalThis);
32
- /**
33
- * @ngdoc method
34
- * @name $interpolateProvider#endSymbol
35
- * @description
36
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
37
- *
38
- * @param {string=} value new value to set the ending symbol to.
39
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
40
- */
41
- endSymbol: (
42
- value?: string | undefined,
43
- ) => string | (Window & typeof globalThis);
44
- $get: (
45
- | string
46
- | ((
47
- $parse: any,
48
- $exceptionHandler: any,
49
- $sce: any,
50
- ) => {
51
- (
52
- text: string,
53
- mustHaveExpression?: boolean | undefined,
54
- trustedContext?: string | undefined,
55
- allOrNothing?: boolean | undefined,
56
- ): (arg0: context) => any;
20
+ /**
21
+ * @ngdoc method
22
+ * @name $interpolateProvider#startSymbol
23
+ * @description
24
+ * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
25
+ *
26
+ * @param {string=} value new value to set the starting symbol to.
27
+ * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
28
+ */
29
+ startSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
30
+ /**
31
+ * @ngdoc method
32
+ * @name $interpolateProvider#endSymbol
33
+ * @description
34
+ * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
35
+ *
36
+ * @param {string=} value new value to set the ending symbol to.
37
+ * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
38
+ */
39
+ endSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
40
+ $get: (string | (($parse: any, $exceptionHandler: any, $sce: any) => {
41
+ (text: string, mustHaveExpression?: boolean | undefined, trustedContext?: string | undefined, allOrNothing?: boolean | undefined): (arg0: context) => any;
57
42
  /**
58
43
  * @ngdoc method
59
44
  * @name $interpolate#startSymbol
@@ -78,6 +63,5 @@ export class $InterpolateProvider {
78
63
  * @returns {string} end symbol.
79
64
  */
80
65
  endSymbol(): string;
81
- })
82
- )[];
66
+ }))[];
83
67
  }
@@ -0,0 +1,4 @@
1
+ export function $$IntervalFactoryProvider(): void;
2
+ export class $$IntervalFactoryProvider {
3
+ $get: (string | (($browser: any, $q: any, $$q: any, $rootScope: any) => (setIntervalFn: any, clearIntervalFn: any) => (fn: any, delay: any, count: any, invokeApply: any, ...args: any[]) => any))[];
4
+ }
@@ -1,4 +1,4 @@
1
1
  export function $IntervalProvider(): void;
2
2
  export class $IntervalProvider {
3
- $get: (string | (($$intervalFactory: any) => any))[];
3
+ $get: (string | (($$intervalFactory: any) => any))[];
4
4
  }
@@ -0,0 +1,209 @@
1
+ /**
2
+ *
3
+ * @param {string} base
4
+ * @param {string} url
5
+ * @returns {string} returns text from `url` after `base` or `undefined` if it does not begin with
6
+ * the expected string.
7
+ */
8
+ export function stripBaseUrl(base: string, url: string): string;
9
+ export function stripHash(url: any): any;
10
+ export function stripFile(url: any): any;
11
+ export function serverBase(url: any): any;
12
+ /**
13
+ * LocationHtml5Url represents a URL
14
+ * This object is exposed as $location service when HTML5 mode is enabled and supported
15
+ *
16
+ * @constructor
17
+ * @param {string} appBase application base URL
18
+ * @param {string} appBaseNoFile application base URL stripped of any filename
19
+ * @param {string} basePrefix URL path prefix
20
+ */
21
+ export function LocationHtml5Url(appBase: string, appBaseNoFile: string, basePrefix: string): void;
22
+ export class LocationHtml5Url {
23
+ /**
24
+ * LocationHtml5Url represents a URL
25
+ * This object is exposed as $location service when HTML5 mode is enabled and supported
26
+ *
27
+ * @constructor
28
+ * @param {string} appBase application base URL
29
+ * @param {string} appBaseNoFile application base URL stripped of any filename
30
+ * @param {string} basePrefix URL path prefix
31
+ */
32
+ constructor(appBase: string, appBaseNoFile: string, basePrefix: string);
33
+ $$html5: boolean;
34
+ /**
35
+ * Parse given HTML5 (regular) URL string into properties
36
+ * @param {string} url HTML5 URL
37
+ * @private
38
+ */
39
+ private $$parse;
40
+ $$normalizeUrl: (url: any) => string;
41
+ $$parseLinkUrl: (url: any, relHref: any) => boolean;
42
+ }
43
+ /**
44
+ * LocationHashbangUrl represents URL
45
+ * This object is exposed as $location service when developer doesn't opt into html5 mode.
46
+ * It also serves as the base class for html5 mode fallback on legacy browsers.
47
+ *
48
+ * @constructor
49
+ * @param {string} appBase application base URL
50
+ * @param {string} appBaseNoFile application base URL stripped of any filename
51
+ * @param {string} hashPrefix hashbang prefix
52
+ */
53
+ export function LocationHashbangUrl(appBase: string, appBaseNoFile: string, hashPrefix: string): void;
54
+ export class LocationHashbangUrl {
55
+ /**
56
+ * LocationHashbangUrl represents URL
57
+ * This object is exposed as $location service when developer doesn't opt into html5 mode.
58
+ * It also serves as the base class for html5 mode fallback on legacy browsers.
59
+ *
60
+ * @constructor
61
+ * @param {string} appBase application base URL
62
+ * @param {string} appBaseNoFile application base URL stripped of any filename
63
+ * @param {string} hashPrefix hashbang prefix
64
+ */
65
+ constructor(appBase: string, appBaseNoFile: string, hashPrefix: string);
66
+ /**
67
+ * Parse given hashbang URL into properties
68
+ * @param {string} url Hashbang URL
69
+ * @private
70
+ */
71
+ private $$parse;
72
+ $$normalizeUrl: (url: any) => string;
73
+ $$parseLinkUrl: (url: any) => boolean;
74
+ }
75
+ /**
76
+ * LocationHashbangUrl represents URL
77
+ * This object is exposed as $location service when html5 history api is enabled but the browser
78
+ * does not support it.
79
+ *
80
+ * @constructor
81
+ * @param {string} appBase application base URL
82
+ * @param {string} appBaseNoFile application base URL stripped of any filename
83
+ * @param {string} hashPrefix hashbang prefix
84
+ */
85
+ export function LocationHashbangInHtml5Url(appBase: string, appBaseNoFile: string, hashPrefix: string, ...args: any[]): void;
86
+ export class LocationHashbangInHtml5Url {
87
+ /**
88
+ * LocationHashbangUrl represents URL
89
+ * This object is exposed as $location service when html5 history api is enabled but the browser
90
+ * does not support it.
91
+ *
92
+ * @constructor
93
+ * @param {string} appBase application base URL
94
+ * @param {string} appBaseNoFile application base URL stripped of any filename
95
+ * @param {string} hashPrefix hashbang prefix
96
+ */
97
+ constructor(appBase: string, appBaseNoFile: string, hashPrefix: string, ...args: any[]);
98
+ $$html5: boolean;
99
+ $$parseLinkUrl: (url: any, relHref: any) => boolean;
100
+ $$normalizeUrl: (url: any) => string;
101
+ }
102
+ /**
103
+ * @ngdoc service
104
+ * @name $location
105
+ *
106
+ * @requires $rootElement
107
+ *
108
+ * @description
109
+ * The $location service parses the URL in the browser address bar (based on the
110
+ * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL
111
+ * available to your application. Changes to the URL in the address bar are reflected into
112
+ * $location service and changes to $location are reflected into the browser address bar.
113
+ *
114
+ * **The $location service:**
115
+ *
116
+ * - Exposes the current URL in the browser address bar, so you can
117
+ * - Watch and observe the URL.
118
+ * - Change the URL.
119
+ * - Synchronizes the URL with the browser when the user
120
+ * - Changes the address bar.
121
+ * - Clicks the back or forward button (or clicks a History link).
122
+ * - Clicks on a link.
123
+ * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
124
+ *
125
+ * For more information see {@link guide/$location Developer Guide: Using $location}
126
+ */
127
+ /**
128
+ * @ngdoc provider
129
+ * @name $locationProvider
130
+ *
131
+ *
132
+ * @description
133
+ * Use the `$locationProvider` to configure how the application deep linking paths are stored.
134
+ */
135
+ export function $LocationProvider(): void;
136
+ export class $LocationProvider {
137
+ /**
138
+ * @ngdoc method
139
+ * @name $locationProvider#hashPrefix
140
+ * @description
141
+ * The default value for the prefix is `'!'`.
142
+ * @param {string=} prefix Prefix for hash part (containing path and search)
143
+ * @returns {*} current value if used as getter or itself (chaining) if used as setter
144
+ */
145
+ hashPrefix: (prefix?: string | undefined) => any;
146
+ /**
147
+ * @ngdoc method
148
+ * @name $locationProvider#html5Mode
149
+ * @description
150
+ * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.
151
+ * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported
152
+ * properties:
153
+ * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to
154
+ * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not
155
+ * support `pushState`.
156
+ * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies
157
+ * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
158
+ * true, and a base tag is not present, an error will be thrown when `$location` is injected.
159
+ * See the {@link guide/$location $location guide for more information}
160
+ * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled,
161
+ * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will
162
+ * only happen on links with an attribute that matches the given string. For example, if set
163
+ * to `'internal-link'`, then the URL will only be rewritten for `<a internal-link>` links.
164
+ * Note that [attribute name normalization](guide/directive#normalization) does not apply
165
+ * here, so `'internalLink'` will **not** match `'internal-link'`.
166
+ *
167
+ * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter
168
+ */
169
+ html5Mode: (mode?: (boolean | any) | undefined) => any;
170
+ /**
171
+ * @ngdoc event
172
+ * @name $location#$locationChangeStart
173
+ * @eventType broadcast on root scope
174
+ * @description
175
+ * Broadcasted before a URL will change.
176
+ *
177
+ * This change can be prevented by calling
178
+ * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
179
+ * details about event object. Upon successful change
180
+ * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
181
+ *
182
+ * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
183
+ * the browser supports the HTML5 History API.
184
+ *
185
+ * @param {Object} angularEvent Synthetic event object.
186
+ * @param {string} newUrl New URL
187
+ * @param {string=} oldUrl URL that was before it was changed.
188
+ * @param {string=} newState New history state object
189
+ * @param {string=} oldState History state object that was before it was changed.
190
+ */
191
+ /**
192
+ * @ngdoc event
193
+ * @name $location#$locationChangeSuccess
194
+ * @eventType broadcast on root scope
195
+ * @description
196
+ * Broadcasted after a URL was changed.
197
+ *
198
+ * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
199
+ * the browser supports the HTML5 History API.
200
+ *
201
+ * @param {Object} angularEvent Synthetic event object.
202
+ * @param {string} newUrl New URL
203
+ * @param {string=} oldUrl URL that was before it was changed.
204
+ * @param {string=} newState New history state object
205
+ * @param {string=} oldState History state object that was before it was changed.
206
+ */
207
+ $get: (string | (($rootScope: any, $browser: any, $rootElement: any) => LocationHtml5Url | LocationHashbangUrl))[];
208
+ }
209
+ export const PATH_MATCH: RegExp;