@angular-wave/angular.ts 0.0.66 → 0.0.68

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 (85) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -2
  3. package/package.json +1 -1
  4. package/src/animations/animate-js.js +4 -4
  5. package/src/animations/animate-swap.js +3 -0
  6. package/src/core/compile/compile.js +3 -3
  7. package/src/core/controller/controller.js +0 -5
  8. package/src/core/di/injector.js +9 -12
  9. package/src/core/di/internal-injector.js +113 -60
  10. package/src/core/interval/interval-factory.js +8 -1
  11. package/src/core/interval/interval.js +30 -16
  12. package/src/core/location/location.js +473 -626
  13. package/src/core/location/location.md +114 -0
  14. package/src/core/location/location.spec.js +1 -76
  15. package/src/core/parser/parse.js +1 -12
  16. package/src/core/parser/parse.spec.js +96 -110
  17. package/src/core/q/q.js +63 -65
  18. package/src/core/sce/sce.js +1 -3
  19. package/src/core/scope/scope.js +2 -5
  20. package/src/core/timeout/timeout.js +110 -111
  21. package/src/core/url-utils/url-utils.js +5 -0
  22. package/src/directive/input/input.js +32 -726
  23. package/src/directive/input/input.md +706 -0
  24. package/src/directive/options/options.js +2 -156
  25. package/src/directive/options/options.md +179 -0
  26. package/src/directive/select/select.js +55 -126
  27. package/src/directive/select/select.md +74 -0
  28. package/src/directive/show-hide/show-hide.js +13 -224
  29. package/src/directive/show-hide/show-hide.md +257 -0
  30. package/src/exts/messages/messages.js +2 -0
  31. package/src/filters/limit-to.spec.js +1 -1
  32. package/src/filters/order-by.spec.js +1 -1
  33. package/src/index.js +6 -2
  34. package/src/loader.js +7 -3
  35. package/src/public.js +1 -7
  36. package/src/router/params/param.js +54 -54
  37. package/src/router/path/path-utils.js +1 -0
  38. package/src/router/state/state-builder.js +2 -4
  39. package/src/router/state/state-service.js +1 -1
  40. package/src/router/state-provider.js +1 -1
  41. package/src/router/template-factory.js +10 -10
  42. package/src/router/url/url-service.js +11 -4
  43. package/src/services/anchor-scroll.js +3 -5
  44. package/src/services/browser.js +2 -9
  45. package/src/services/cache-factory.js +0 -67
  46. package/src/services/cache-factory.md +75 -0
  47. package/src/services/cookie-reader.js +36 -55
  48. package/src/services/http/http.js +62 -587
  49. package/src/services/http/http.md +413 -0
  50. package/src/services/http-backend/http-backend.js +19 -44
  51. package/src/services/template-request.js +1 -9
  52. package/src/shared/jqlite/jqlite.js +5 -70
  53. package/src/types.js +2 -4
  54. package/types/animations/animate-swap.d.ts +4 -7
  55. package/types/core/compile/compile.d.ts +6 -6
  56. package/types/core/controller/controller.d.ts +0 -5
  57. package/types/core/di/internal-injector.d.ts +73 -18
  58. package/types/core/exception-handler.d.ts +1 -1
  59. package/types/core/interval/interval-factory.d.ts +1 -1
  60. package/types/core/interval/interval.d.ts +4 -0
  61. package/types/core/location/location.d.ts +235 -166
  62. package/types/core/parser/parse.d.ts +1 -1
  63. package/types/core/q/q.d.ts +61 -40
  64. package/types/core/scope/scope.d.ts +5 -8
  65. package/types/core/timeout/timeout.d.ts +16 -26
  66. package/types/core/url-utils/url-utils.d.ts +4 -0
  67. package/types/directive/input/input.d.ts +19 -124
  68. package/types/directive/select/select.d.ts +7 -74
  69. package/types/directive/show-hide/show-hide.d.ts +11 -224
  70. package/types/loader.d.ts +4 -4
  71. package/types/router/params/param.d.ts +11 -0
  72. package/types/router/state/state-builder.d.ts +1 -2
  73. package/types/router/state/state-service.d.ts +2 -2
  74. package/types/router/state-provider.d.ts +2 -2
  75. package/types/router/template-factory.d.ts +15 -15
  76. package/types/router/url/url-service.d.ts +12 -12
  77. package/types/services/anchor-scroll.d.ts +1 -1
  78. package/types/services/browser.d.ts +0 -10
  79. package/types/services/cache-factory.d.ts +0 -67
  80. package/types/services/cookie-reader.d.ts +2 -10
  81. package/types/services/http/http.d.ts +53 -61
  82. package/types/services/http-backend/http-backend.d.ts +8 -31
  83. package/types/services/template-request.d.ts +1 -9
  84. package/types/shared/jqlite/jqlite.d.ts +11 -11
  85. package/types/types.d.ts +1 -9
@@ -1,228 +1,15 @@
1
1
  /**
2
- * @ngdoc directive
3
- * @name ngShow
4
- * @multiElement
5
- *
6
- * @description
7
- * The `ngShow` directive shows or hides the given HTML element based on the expression provided to
8
- * the `ngShow` attribute.
9
- *
10
- * The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.
11
- * The `.ng-hide` CSS class is predefined in AngularJS and sets the display style to none (using an
12
- * `!important` flag). For CSP mode please add `angular-csp.css` to your HTML file (see
13
- * {@link ng.directive:ngCsp ngCsp}).
14
- *
15
- * ```html
16
- * <!-- when $scope.myValue is truthy (element is visible) -->
17
- * <div ng-show="myValue"></div>
18
- *
19
- * <!-- when $scope.myValue is falsy (element is hidden) -->
20
- * <div ng-show="myValue" class="ng-hide"></div>
21
- * ```
22
- *
23
- * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added
24
- * to the class attribute on the element causing it to become hidden. When truthy, the `.ng-hide`
25
- * CSS class is removed from the element causing the element not to appear hidden.
26
- *
27
- * ## Why is `!important` used?
28
- *
29
- * You may be wondering why `!important` is used for the `.ng-hide` CSS class. This is because the
30
- * `.ng-hide` selector can be easily overridden by heavier selectors. For example, something as
31
- * simple as changing the display style on a HTML list item would make hidden elements appear
32
- * visible. This also becomes a bigger issue when dealing with CSS frameworks.
33
- *
34
- * By using `!important`, the show and hide behavior will work as expected despite any clash between
35
- * CSS selector specificity (when `!important` isn't used with any conflicting styles). If a
36
- * developer chooses to override the styling to change how to hide an element then it is just a
37
- * matter of using `!important` in their own CSS code.
38
- *
39
- * ### Overriding `.ng-hide`
40
- *
41
- * By default, the `.ng-hide` class will style the element with `display: none !important`. If you
42
- * wish to change the hide behavior with `ngShow`/`ngHide`, you can simply overwrite the styles for
43
- * the `.ng-hide` CSS class. Note that the selector that needs to be used is actually
44
- * `.ng-hide:not(.ng-hide-animate)` to cope with extra animation classes that can be added.
45
- *
46
- * ```css
47
- * .ng-hide:not(.ng-hide-animate) {
48
- * /&#42; These are just alternative ways of hiding an element &#42;/
49
- * display: block!important;
50
- * position: absolute;
51
- * top: -9999px;
52
- * left: -9999px;
53
- * }
54
- * ```
55
- *
56
- * By default you don't need to override anything in CSS and the animations will work around the
57
- * display style.
58
- *
59
- * @animations
60
- * | Animation | Occurs |
61
- * |-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
62
- * | {@link $animate#addClass addClass} `.ng-hide` | After the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden. |
63
- * | {@link $animate#removeClass removeClass} `.ng-hide` | After the `ngShow` expression evaluates to a truthy value and just before contents are set to visible. |
64
- *
65
- * Animations in `ngShow`/`ngHide` work with the show and hide events that are triggered when the
66
- * directive expression is true and false. This system works like the animation system present with
67
- * `ngClass` except that you must also include the `!important` flag to override the display
68
- * property so that the elements are not actually hidden during the animation.
69
- *
70
- * ```css
71
- * /&#42; A working example can be found at the bottom of this page. &#42;/
72
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
73
- * transition: all 0.5s linear;
74
- * }
75
- *
76
- * .my-element.ng-hide-add { ... }
77
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
78
- * .my-element.ng-hide-remove { ... }
79
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
80
- * ```
81
- *
82
- * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property
83
- * to block during animation states - ngAnimate will automatically handle the style toggling for you.
84
- *
85
- * @element ANY
86
- * @param {string} ngShow If the {@link guide/expression expression} is truthy/falsy then the
87
- * element is shown/hidden respectively.
88
- *
89
- * @example
90
- * A simple example, animating the element's opacity:
91
-
92
- * <hr />
93
- *
94
- * @knownIssue
95
- *
96
- * ### Flickering when using ngShow to toggle between elements
97
- *
98
- * When using {@link ngShow} and / or {@link ngHide} to toggle between elements, it can
99
- * happen that both the element to show and the element to hide are visible for a very short time.
100
- *
101
- * This usually happens when the {@link ngAnimate ngAnimate module} is included, but no actual animations
102
- * are defined for {@link ngShow} / {@link ngHide}.
103
- *
104
- * There are several way to mitigate this problem:
105
- *
106
- * - {@link guide/animations#how-to-selectively-enable-disable-and-skip-animations Disable animations on the affected elements}.
107
- * - Use {@link ngIf} or {@link ngSwitch} instead of {@link ngShow} / {@link ngHide}.
108
- * - Use the special CSS selector `ng-hide.ng-hide-animate` to set `{display: none}` or similar on the affected elements.
109
- * - Use `ng-class="{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.
110
- * - Define an animation on the affected elements.
2
+ * @returns {import('../../types').Directive}
111
3
  */
112
- export const ngShowDirective: (string | (($animate: any) => {
113
- restrict: string;
114
- multiElement: boolean;
115
- link(scope: any, element: any, attr: any): void;
116
- }))[];
4
+ export function ngShowDirective($animate: any): import("../../types").Directive;
5
+ export namespace ngShowDirective {
6
+ let $inject: string[];
7
+ }
117
8
  /**
118
- * @ngdoc directive
119
- * @name ngHide
120
- * @multiElement
121
- *
122
- * @description
123
- * The `ngHide` directive shows or hides the given HTML element based on the expression provided to
124
- * the `ngHide` attribute.
125
- *
126
- * The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.
127
- * The `.ng-hide` CSS class is predefined in AngularJS and sets the display style to none (using an
128
- * `!important` flag). For CSP mode please add `angular-csp.css` to your HTML file (see
129
- * {@link ng.directive:ngCsp ngCsp}).
130
- *
131
- * ```html
132
- * <!-- when $scope.myValue is truthy (element is hidden) -->
133
- * <div ng-hide="myValue" class="ng-hide"></div>
134
- *
135
- * <!-- when $scope.myValue is falsy (element is visible) -->
136
- * <div ng-hide="myValue"></div>
137
- * ```
138
- *
139
- * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added
140
- * to the class attribute on the element causing it to become hidden. When falsy, the `.ng-hide`
141
- * CSS class is removed from the element causing the element not to appear hidden.
142
- *
143
- * ## Why is `!important` used?
144
- *
145
- * You may be wondering why `!important` is used for the `.ng-hide` CSS class. This is because the
146
- * `.ng-hide` selector can be easily overridden by heavier selectors. For example, something as
147
- * simple as changing the display style on a HTML list item would make hidden elements appear
148
- * visible. This also becomes a bigger issue when dealing with CSS frameworks.
149
- *
150
- * By using `!important`, the show and hide behavior will work as expected despite any clash between
151
- * CSS selector specificity (when `!important` isn't used with any conflicting styles). If a
152
- * developer chooses to override the styling to change how to hide an element then it is just a
153
- * matter of using `!important` in their own CSS code.
154
- *
155
- * ### Overriding `.ng-hide`
156
- *
157
- * By default, the `.ng-hide` class will style the element with `display: none !important`. If you
158
- * wish to change the hide behavior with `ngShow`/`ngHide`, you can simply overwrite the styles for
159
- * the `.ng-hide` CSS class. Note that the selector that needs to be used is actually
160
- * `.ng-hide:not(.ng-hide-animate)` to cope with extra animation classes that can be added.
161
- *
162
- * ```css
163
- * .ng-hide:not(.ng-hide-animate) {
164
- * /&#42; These are just alternative ways of hiding an element &#42;/
165
- * display: block!important;
166
- * position: absolute;
167
- * top: -9999px;
168
- * left: -9999px;
169
- * }
170
- * ```
171
- *
172
- * By default you don't need to override in CSS anything and the animations will work around the
173
- * display style.
174
- *
175
- * @animations
176
- * | Animation | Occurs |
177
- * |-----------------------------------------------------|------------------------------------------------------------------------------------------------------------|
178
- * | {@link $animate#addClass addClass} `.ng-hide` | After the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden. |
179
- * | {@link $animate#removeClass removeClass} `.ng-hide` | After the `ngHide` expression evaluates to a non truthy value and just before contents are set to visible. |
180
- *
181
- * Animations in `ngShow`/`ngHide` work with the show and hide events that are triggered when the
182
- * directive expression is true and false. This system works like the animation system present with
183
- * `ngClass` except that you must also include the `!important` flag to override the display
184
- * property so that the elements are not actually hidden during the animation.
185
- *
186
- * ```css
187
- * /&#42; A working example can be found at the bottom of this page. &#42;/
188
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
189
- * transition: all 0.5s linear;
190
- * }
191
- *
192
- * .my-element.ng-hide-add { ... }
193
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
194
- * .my-element.ng-hide-remove { ... }
195
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
196
- * ```
197
- *
198
- * Keep in mind that, as of AngularJS version 1.3, there is no need to change the display property
199
- * to block during animation states - ngAnimate will automatically handle the style toggling for you.
200
- *
201
- * @element ANY
202
- * @param {string} ngHide If the {@link guide/expression expression} is truthy/falsy then the
203
- * element is hidden/shown respectively.
204
- *
205
- * @knownIssue
206
- *
207
- * ### Flickering when using ngHide to toggle between elements
208
- *
209
- * When using {@link ngShow} and / or {@link ngHide} to toggle between elements, it can
210
- * happen that both the element to show and the element to hide are visible for a very short time.
211
- *
212
- * This usually happens when the {@link ngAnimate ngAnimate module} is included, but no actual animations
213
- * are defined for {@link ngShow} / {@link ngHide}. Internet Explorer is affected more often than
214
- * other browsers.
215
- *
216
- * There are several way to mitigate this problem:
217
- *
218
- * - {@link guide/animations#how-to-selectively-enable-disable-and-skip-animations Disable animations on the affected elements}.
219
- * - Use {@link ngIf} or {@link ngSwitch} instead of {@link ngShow} / {@link ngHide}.
220
- * - Use the special CSS selector `ng-hide.ng-hide-animate` to set `{display: none}` or similar on the affected elements.
221
- * - Use `ng-class="{'ng-hide': expression}` instead of instead of {@link ngShow} / {@link ngHide}.
222
- * - Define an animation on the affected elements.
9
+ * @returns {import('../../types').Directive}
223
10
  */
224
- export const ngHideDirective: (string | (($animate: any) => {
225
- restrict: string;
226
- multiElement: boolean;
227
- link(scope: any, element: any, attr: any): void;
228
- }))[];
11
+ export function ngHideDirective($animate: any): import("../../types").Directive;
12
+ export namespace ngHideDirective {
13
+ let $inject_1: string[];
14
+ export { $inject_1 as $inject };
15
+ }
package/types/loader.d.ts CHANGED
@@ -79,9 +79,9 @@ export class Angular {
79
79
  *
80
80
  * @param {any[]} modules
81
81
  * @param {boolean?} strictDi
82
- * @returns {import("./types").InjectorService}
82
+ * @returns {import("./core/di/internal-injector").InjectorService}
83
83
  */
84
- injector(modules: any[], strictDi: boolean | null): import("./types").InjectorService;
84
+ injector(modules: any[], strictDi: boolean | null): import("./core/di/internal-injector").InjectorService;
85
85
  /**
86
86
  * @param {Element|Document} element
87
87
  */
@@ -129,11 +129,11 @@ export class Angular {
129
129
  * @param {string} name The name of the module to create or retrieve.
130
130
  * @param {Array.<string>} [requires] If specified then new module is being created. If
131
131
  * unspecified then the module is being retrieved for further configuration.
132
- * @param {Function} [configFn] Optional configuration function for the module. Same as
132
+ * @param {Array<any>|Function} [configFn] Optional configuration function for the module. Same as
133
133
  * {@link import('./types').Module#config Module#config()}.
134
134
  * @returns {NgModule} A newly registered module.
135
135
  */
136
- module(name: string, requires?: Array<string>, configFn?: Function): NgModule;
136
+ module(name: string, requires?: Array<string>, configFn?: Array<any> | Function): NgModule;
137
137
  }
138
138
  /**
139
139
  * Configuration option for AngularTS bootstrap process.
@@ -25,6 +25,17 @@ export class Param {
25
25
  /** Returns true if a the parameter values are valid, according to the Param definitions */
26
26
  static validates(params: any, values?: {}): any;
27
27
  constructor(id: any, type: any, location: any, urlConfig: any, state: any);
28
+ isOptional: boolean;
29
+ type: any;
30
+ location: any;
31
+ id: any;
32
+ dynamic: boolean;
33
+ raw: boolean;
34
+ squash: any;
35
+ replace: any;
36
+ inherit: boolean;
37
+ array: any;
38
+ config: any;
28
39
  isDefaultValue(value: any): any;
29
40
  /**
30
41
  * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the
@@ -57,7 +57,7 @@ export class StateBuilder {
57
57
  matcher: any;
58
58
  $injector: any;
59
59
  builders: {
60
- name: (typeof nameBuilder)[];
60
+ name: ((state: any) => any)[];
61
61
  self: (typeof selfBuilder)[];
62
62
  parent: ((state: any) => any)[];
63
63
  data: (typeof dataBuilder)[];
@@ -81,7 +81,6 @@ export class StateBuilder {
81
81
  parentName(state: any): any;
82
82
  name(state: any): any;
83
83
  }
84
- declare function nameBuilder(state: any): any;
85
84
  declare function selfBuilder(state: any): any;
86
85
  declare function dataBuilder(state: any): any;
87
86
  declare function pathBuilder(state: any): any;
@@ -123,9 +123,9 @@ export class StateService {
123
123
  decorator(name: string, func: object): object;
124
124
  /**
125
125
  *
126
- * @param {angular.Ng1StateDeclaration} definition
126
+ * @param {any} definition
127
127
  */
128
- state(definition: angular.Ng1StateDeclaration): this;
128
+ state(definition: any): this;
129
129
  /**
130
130
  * Handler for when [[transitionTo]] is called with an invalid state.
131
131
  *
@@ -110,10 +110,10 @@ export class StateProvider {
110
110
  decorator(name: string, func: object): object;
111
111
  /**
112
112
  *
113
- * @param {angular.Ng1StateDeclaration} definition
113
+ * @param {*} definition
114
114
  * @returns {StateProvider}
115
115
  */
116
- state(definition: angular.Ng1StateDeclaration): StateProvider;
116
+ state(definition: any): StateProvider;
117
117
  /**
118
118
  * Registers an invalid state handler
119
119
  *
@@ -9,11 +9,11 @@
9
9
  export class TemplateFactory {
10
10
  /** @type {boolean} */
11
11
  _useHttp: boolean;
12
- $get: (string | (($http: angular.IHttpService, $templateCache: angular.ITemplateCacheService, $templateRequest: angular.ITemplateRequestService, $q: angular.IQService, $injector: import("../core/di/internal-injector").InjectorService) => this))[];
13
- $templateRequest: angular.ITemplateRequestService;
14
- $http: angular.IHttpService;
15
- $templateCache: angular.ITemplateCacheService;
16
- $q: angular.IQService;
12
+ $get: (string | (($http: any, $templateCache: any, $templateRequest: any, $q: any, $injector: import("../core/di/internal-injector").InjectorService) => this))[];
13
+ $templateRequest: any;
14
+ $http: any;
15
+ $templateCache: any;
16
+ $q: any;
17
17
  $injector: import("../core/di/internal-injector").InjectorService;
18
18
  /**
19
19
  * Forces the provider to use $http service directly
@@ -27,24 +27,24 @@ export class TemplateFactory {
27
27
  * The following properties are search in the specified order, and the first one
28
28
  * that is defined is used to create the template:
29
29
  *
30
- * @param {angular.Ng1ViewDeclaration} config
30
+ * @param {any} config
31
31
  * @param {any} params Parameters to pass to the template function.
32
- * @param {angular.ResolveContext} context The resolve context associated with the template's view
32
+ * @param {import("./resolve/resolve-context").ResolveContext} context The resolve context associated with the template's view
33
33
  *
34
34
  * @return {string|object} The template html as a string, or a promise for
35
35
  * that string,or `null` if no template is configured.
36
36
  */
37
- fromConfig(config: angular.Ng1ViewDeclaration, params: any, context: angular.ResolveContext): string | object;
37
+ fromConfig(config: any, params: any, context: import("./resolve/resolve-context").ResolveContext): string | object;
38
38
  /**
39
39
  * Creates a template from a string or a function returning a string.
40
40
  *
41
41
  * @param {string | Function} template html template as a string or function that returns an html template as a string.
42
- * @param {angular.RawParams} [params] Parameters to pass to the template function.
42
+ * @param {any} [params] Parameters to pass to the template function.
43
43
  *
44
44
  * @return {string|object} The template html as a string, or a promise for that
45
45
  * string.
46
46
  */
47
- fromString(template: string | Function, params?: angular.RawParams): string | object;
47
+ fromString(template: string | Function, params?: any): string | object;
48
48
  /**
49
49
  * Loads a template from the a URL via `$http` and `$templateCache`.
50
50
  *
@@ -60,11 +60,11 @@ export class TemplateFactory {
60
60
  *
61
61
  * @param {import('../types').Injectable<any>} provider Function to invoke via `locals`
62
62
  * @param {Function} injectFn a function used to invoke the template provider
63
- * @param {angular.ResolveContext} context
63
+ * @param {import("./resolve/resolve-context").ResolveContext} context
64
64
  * @return {string|Promise.<string>} The template html as a string, or a promise
65
65
  * for that string.
66
66
  */
67
- fromProvider(provider: import("../types").Injectable<any>, params: any, context: angular.ResolveContext): string | Promise<string>;
67
+ fromProvider(provider: import("../types").Injectable<any>, params: any, context: import("./resolve/resolve-context").ResolveContext): string | Promise<string>;
68
68
  /**
69
69
  * Creates a component's template by invoking an injectable provider function.
70
70
  *
@@ -81,13 +81,13 @@ export class TemplateFactory {
81
81
  * It analyses the component's bindings, then constructs a template that instantiates the component.
82
82
  * The template wires input and output bindings to resolves or from the parent component.
83
83
  *
84
- * @param {angular.IAugmentedJQuery} ngView {object} The parent ui-view (for binding outputs to callbacks)
85
- * @param {angular.ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
84
+ * @param {any} ngView {object} The parent ui-view (for binding outputs to callbacks)
85
+ * @param {import("./resolve/resolve-context").ResolveContext} context The ResolveContext (for binding outputs to callbacks returned from resolves)
86
86
  * @param {string} component {string} Component's name in camel case.
87
87
  * @param {any} [bindings] An object defining the component's bindings: {foo: '<'}
88
88
  * @return {string} The template as a string: "<component-name input1='::$resolve.foo'></component-name>".
89
89
  */
90
- makeComponentTemplate(ngView: angular.IAugmentedJQuery, context: angular.ResolveContext, component: string, bindings?: any): string;
90
+ makeComponentTemplate(ngView: any, context: import("./resolve/resolve-context").ResolveContext, component: string, bindings?: any): string;
91
91
  }
92
92
  export type BindingTuple = {
93
93
  name: string;
@@ -9,8 +9,8 @@ export class UrlService {
9
9
  constructor($locationProvider: import("../../core/location/location").$LocationProvider, stateService: any, globals: any, urlConfigProvider: any);
10
10
  stateService: any;
11
11
  $locationProvider: import("../../core/location/location").$LocationProvider;
12
- $location: any;
13
- $browser: any;
12
+ $location: import("../../core/location/location").Location;
13
+ $browser: import("../../services/browser").Browser;
14
14
  /** @type {boolean} */
15
15
  interceptDeferred: boolean;
16
16
  /** Provides services related to the URL */
@@ -54,12 +54,12 @@ export class UrlService {
54
54
  *
55
55
  * @return the hash (anchor) portion of the url
56
56
  */
57
- hash: () => any;
57
+ hash: () => string | import("../../core/location/location").Location;
58
58
  _urlListeners: any[];
59
- $get: (string | (($location: any, $browser: any, $rootScope: any) => this))[];
59
+ $get: (string | (($location: import("../../core/location/location").Location, $browser: import("../../services/browser").Browser, $rootScope: import("../../core/scope/scope").Scope) => this))[];
60
60
  html5Mode(): boolean;
61
- baseHref(): any;
62
- _baseHref: any;
61
+ baseHref(): string;
62
+ _baseHref: string;
63
63
  /**
64
64
  * Gets the current url, or updates the url
65
65
  *
@@ -104,15 +104,15 @@ export class UrlService {
104
104
  * locationServices.url("/some/path?query=value#anchor", true);
105
105
  * ```
106
106
  *
107
- * @param {string} newUrl The new value for the URL.
107
+ * @param {string} [newUrl] The new value for the URL.
108
108
  * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.
109
109
  * It should not include the protocol, site, port, or base path of an absolute HREF.
110
- * @param {boolean} replace When true, replaces the current history entry (instead of appending it) with this new url
111
- * @param {any} state The history's state object, i.e., pushState (if the LocationServices implementation supports it)
110
+ * @param {boolean} [replace] When true, replaces the current history entry (instead of appending it) with this new url
111
+ * @param {any} [state] The history's state object, i.e., pushState (if the LocationServices implementation supports it)
112
112
  *
113
113
  * @return the url (after potentially being processed)
114
114
  */
115
- url(newUrl: string, replace: boolean, state: any): any;
115
+ url(newUrl?: string, replace?: boolean, state?: any): string | import("../../core/location/location").Location;
116
116
  /**
117
117
  * @internal
118
118
  *
@@ -137,7 +137,7 @@ export class UrlService {
137
137
  parts(): {
138
138
  path: any;
139
139
  search: any;
140
- hash: any;
140
+ hash: string | import("../../core/location/location").Location;
141
141
  };
142
142
  /**
143
143
  * Activates the best rule for the current URL
@@ -218,7 +218,7 @@ export class UrlService {
218
218
  */
219
219
  match(url: any): any;
220
220
  update(read: any): void;
221
- location: any;
221
+ location: string | import("../../core/location/location").Location;
222
222
  /**
223
223
  * Internal API.
224
224
  *
@@ -1,5 +1,5 @@
1
1
  export function AnchorScrollProvider(): void;
2
2
  export class AnchorScrollProvider {
3
3
  disableAutoScrolling: () => void;
4
- $get: (string | (($location: angular.IRootScopeService, $rootScope: any) => (hash: any) => void))[];
4
+ $get: (string | (($location: import("../core/location/location").Location, $rootScope: import("../core/scope/scope").Scope) => (hash: any) => void))[];
5
5
  }
@@ -149,8 +149,6 @@ export class Browser {
149
149
  cancel: (deferId: number) => boolean;
150
150
  }
151
151
  /**
152
- * @typedef {import('../types').ServiceProvider} angular.BrowserProvider
153
- * @description
154
152
  * This object has two goals:
155
153
  *
156
154
  * - hide all the global state in the browser caused by the window object
@@ -158,15 +156,7 @@ export class Browser {
158
156
  *
159
157
  * Remove this in the future
160
158
  */
161
- /**
162
- * @constructor
163
- * @this {angular.BrowserProvider}
164
- */
165
- export function BrowserProvider(this: import("../types").ServiceProvider): void;
166
159
  export class BrowserProvider {
167
160
  $get: (string | (($$taskTrackerFactory: import("../core/task-tracker-factory").TaskTracker) => Browser))[];
168
161
  }
169
162
  export type UrlChangeListener = (arg0: string, arg1: string | null) => any;
170
- export namespace angular {
171
- type BrowserProvider = import("../types").ServiceProvider;
172
- }
@@ -1,70 +1,3 @@
1
- /**
2
- * @ngdoc service
3
- * @name $cacheFactory
4
- *
5
- *
6
- * @description
7
- * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
8
- * them.
9
- *
10
- * ```js
11
- *
12
- * let cache = $cacheFactory('cacheId');
13
- * expect($cacheFactory.get('cacheId')).toBe(cache);
14
- * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
15
- *
16
- * cache.put("key", "value");
17
- * cache.put("another key", "another value");
18
- *
19
- * // We've specified no options on creation
20
- * expect(cache.info()).toEqual({id: 'cacheId', size: 2});
21
- *
22
- * ```
23
- *
24
- *
25
- * @example
26
- <example module="cacheExampleApp" name="cache-factory">
27
- <file name="index.html">
28
- <div ng-controller="CacheController">
29
- <input ng-model="newCacheKey" placeholder="Key">
30
- <input ng-model="newCacheValue" placeholder="Value">
31
- <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
32
-
33
- <p ng-if="keys.length">Cached Values</p>
34
- <div ng-repeat="key in keys">
35
- <span ng-bind="key"></span>
36
- <span>: </span>
37
- <b ng-bind="cache.get(key)"></b>
38
- </div>
39
-
40
- <p>Cache Info</p>
41
- <div ng-repeat="(key, value) in cache.info()">
42
- <span ng-bind="key"></span>
43
- <span>: </span>
44
- <b ng-bind="value"></b>
45
- </div>
46
- </div>
47
- </file>
48
- <file name="script.js">
49
- angular.module('cacheExampleApp', []).
50
- controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
51
- $scope.keys = [];
52
- $scope.cache = $cacheFactory('cacheId');
53
- $scope.put = function(key, value) {
54
- if (angular.isUndefined($scope.cache.get(key))) {
55
- $scope.keys.push(key);
56
- }
57
- $scope.cache.put(key, angular.isUndefined(value) ? null : value);
58
- };
59
- }]);
60
- </file>
61
- <file name="style.css">
62
- p {
63
- margin: 10px 0 3px;
64
- }
65
- </file>
66
- </example>
67
- */
68
1
  export function CacheFactoryProvider(): void;
69
2
  export class CacheFactoryProvider {
70
3
  $get: () => {
@@ -1,12 +1,4 @@
1
1
  /**
2
- *
3
- * @description
4
- * This is a private service for reading cookies used by $http and ngCookies
5
- *
6
- * @return {Object} a key/value map of the current cookies
2
+ * @returns {Object<String, String>} List of all cookies
7
3
  */
8
- export function $$CookieReader(): any;
9
- export function CookieReaderProvider(): void;
10
- export class CookieReaderProvider {
11
- $get: typeof $$CookieReader;
12
- }
4
+ export function getCookies(): any;