@angular-wave/angular.ts 0.9.3 → 0.9.4

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 (195) hide show
  1. package/@types/angular.d.ts +4 -19
  2. package/@types/animations/animate.d.ts +2 -2
  3. package/@types/animations/animation.d.ts +1 -1
  4. package/@types/core/compile/attributes.d.ts +1 -1
  5. package/@types/core/compile/compile.d.ts +2 -2
  6. package/@types/core/controller/controller.d.ts +1 -1
  7. package/@types/core/controller/interface.d.ts +6 -0
  8. package/@types/core/di/ng-module.d.ts +27 -26
  9. package/@types/core/filter/filter.d.ts +5 -5
  10. package/@types/core/interpolate/interface.d.ts +13 -0
  11. package/@types/core/interpolate/interpolate.d.ts +1 -13
  12. package/@types/core/scope/scope.d.ts +4 -1
  13. package/@types/directive/http/http.d.ts +16 -16
  14. package/@types/directive/http/interface.d.ts +27 -0
  15. package/@types/directive/include/include.d.ts +4 -4
  16. package/@types/directive/inject/inject.d.ts +12 -0
  17. package/@types/directive/model/model.d.ts +1 -1
  18. package/@types/directive/script/script.d.ts +2 -2
  19. package/@types/directive/setter/setter.d.ts +4 -4
  20. package/@types/filters/filter.d.ts +2 -2
  21. package/@types/filters/filters.d.ts +2 -2
  22. package/@types/filters/interface.d.ts +8 -0
  23. package/@types/filters/limit-to.d.ts +2 -2
  24. package/@types/filters/order-by.d.ts +2 -2
  25. package/@types/index.d.ts +84 -1
  26. package/@types/interface.d.ts +105 -82
  27. package/@types/router/state/interface.d.ts +8 -8
  28. package/@types/router/state-filters.d.ts +4 -4
  29. package/@types/router/template-factory.d.ts +6 -6
  30. package/@types/router/transition/hook-builder.d.ts +5 -2
  31. package/@types/router/transition/hook-registry.d.ts +11 -2
  32. package/@types/router/transition/transition-service.d.ts +6 -2
  33. package/@types/router/transition/transition.d.ts +2 -2
  34. package/@types/router/view/view.d.ts +1 -8
  35. package/@types/router/view-scroll.d.ts +4 -2
  36. package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
  37. package/@types/services/exception/exception-handler.d.ts +2 -2
  38. package/@types/services/exception/interface.d.ts +1 -1
  39. package/@types/services/http/http.d.ts +40 -2
  40. package/@types/services/http/interface.d.ts +11 -0
  41. package/@types/services/location/location.d.ts +1 -4
  42. package/@types/services/sce/sce.d.ts +3 -4
  43. package/@types/services/template-cache/template-cache.d.ts +4 -4
  44. package/@types/services/template-request/interface.d.ts +22 -0
  45. package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
  46. package/@types/shared/common.d.ts +8 -69
  47. package/@types/shared/hof.d.ts +7 -7
  48. package/dist/angular-ts.esm.js +509 -569
  49. package/dist/angular-ts.umd.js +509 -569
  50. package/dist/angular-ts.umd.min.js +1 -1
  51. package/{src/filters → docs/content/docs/filter}/filter.md +18 -9
  52. package/{src/filters → docs/content/docs/filter}/json.md +6 -3
  53. package/docs/content/docs/filter/limit-to.md +30 -0
  54. package/docs/content/docs/filter/order-by.md +123 -0
  55. package/docs/content/docs/provider/sceProvider.md +194 -0
  56. package/docs/content/docs/provider/templateRequestProvider.md +5 -0
  57. package/docs/content/docs/service/compile.md +5 -0
  58. package/docs/content/docs/service/controller.md +5 -0
  59. package/docs/content/docs/service/http.md +161 -0
  60. package/docs/content/docs/service/interpolation.md +5 -0
  61. package/docs/content/docs/service/log.md +1 -1
  62. package/docs/content/docs/service/parse.md +5 -0
  63. package/docs/content/docs/service/rootElement.md +5 -0
  64. package/docs/content/docs/service/rootScope.md +5 -0
  65. package/docs/content/docs/service/sce.md +194 -0
  66. package/docs/content/docs/service/templateRequest.md +5 -0
  67. package/docs/content/docs/values/_index.md +4 -0
  68. package/docs/content/docs/values/document.md +29 -0
  69. package/docs/content/docs/values/window.md +29 -0
  70. package/docs/layouts/shortcodes/version.html +1 -1
  71. package/docs/static/examples/document/document.html +3 -0
  72. package/docs/static/examples/i18n/i18n.html +77 -0
  73. package/docs/static/examples/window/window.html +4 -0
  74. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  75. package/docs/static/typedoc/assets/highlight.css +0 -49
  76. package/docs/static/typedoc/assets/navigation.js +1 -1
  77. package/docs/static/typedoc/assets/search.js +1 -1
  78. package/docs/static/typedoc/classes/PubSubProvider.html +3 -2
  79. package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
  80. package/docs/static/typedoc/hierarchy.html +1 -1
  81. package/docs/static/typedoc/index.html +1 -1
  82. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
  83. package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
  84. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
  85. package/docs/static/typedoc/interfaces/ServiceProvider.html +3 -3
  86. package/docs/static/typedoc/types/HttpParamSerializer.html +2 -0
  87. package/docs/static/typedoc/types/{Expression.html → HttpParams.html} +1 -5
  88. package/legacy.d.ts +0 -921
  89. package/package.json +1 -1
  90. package/src/angular.js +2 -9
  91. package/src/animations/animate.js +1 -1
  92. package/src/animations/animation.js +7 -7
  93. package/src/core/compile/compile.js +3 -2
  94. package/src/core/controller/controller.js +10 -6
  95. package/src/core/controller/interface.ts +6 -0
  96. package/src/core/di/injector.js +1 -1
  97. package/src/core/di/internal-injector.js +2 -0
  98. package/src/core/di/ng-module.js +16 -13
  99. package/src/core/filter/filter.js +3 -3
  100. package/src/core/interpolate/interface.ts +14 -0
  101. package/src/core/interpolate/interpolate.js +7 -5
  102. package/src/core/scope/scope.js +4 -1
  103. package/src/directive/http/delete.spec.js +5 -8
  104. package/src/directive/http/http.js +16 -16
  105. package/src/directive/http/interface.ts +36 -0
  106. package/src/directive/http/put.spec.js +5 -8
  107. package/src/directive/include/include.js +2 -2
  108. package/src/{services/http-backend/http-backend.html → directive/inject/inject.html} +1 -4
  109. package/src/directive/inject/inject.js +35 -0
  110. package/src/directive/inject/inject.spec.js +108 -0
  111. package/src/{services/http-backend/http-backend.test.js → directive/inject/inject.test.js} +1 -1
  112. package/src/directive/script/script.js +1 -1
  113. package/src/directive/setter/setter.js +2 -2
  114. package/src/filters/filter.js +1 -1
  115. package/src/filters/filters.js +1 -1
  116. package/src/filters/interface.ts +9 -0
  117. package/src/filters/limit-to.js +1 -1
  118. package/src/filters/order-by.js +1 -1
  119. package/src/index.ts +96 -0
  120. package/src/injection-tokens.js +4 -1
  121. package/src/interface.ts +102 -93
  122. package/src/ng.js +6 -4
  123. package/src/ng.spec.js +12 -0
  124. package/src/router/directives/state-directives.js +1 -1
  125. package/src/router/directives/view-directive.spec.js +19 -35
  126. package/src/router/state/interface.ts +8 -8
  127. package/src/router/state/state-builder.js +4 -4
  128. package/src/router/state/state-registry.js +7 -2
  129. package/src/router/state/state-service.js +2 -14
  130. package/src/router/state-filters.js +2 -2
  131. package/src/router/template-factory.js +3 -3
  132. package/src/router/template-factory.spec.js +10 -19
  133. package/src/router/transition/hook-builder.js +5 -1
  134. package/src/router/transition/hook-registry.js +12 -3
  135. package/src/router/transition/transition-service.js +4 -9
  136. package/src/router/transition/transition.js +3 -2
  137. package/src/router/url/url-service.js +2 -2
  138. package/src/router/view/view.js +3 -15
  139. package/src/router/view-scroll.js +2 -2
  140. package/src/services/{anchor-scroll.js → anchor-scroll/anchor-scroll.js} +4 -4
  141. package/src/services/exception/exception-handler.js +1 -1
  142. package/src/services/exception/interface.ts +1 -1
  143. package/src/services/http/http.js +200 -13
  144. package/src/services/http/http.spec.js +388 -9
  145. package/src/services/http/interface.ts +13 -0
  146. package/src/services/location/location.js +1 -1
  147. package/src/services/sce/sce.js +18 -13
  148. package/src/services/template-cache/template-cache.js +2 -2
  149. package/src/services/template-request/interface.ts +23 -0
  150. package/src/services/{template-request.js → template-request/template-request.js} +6 -6
  151. package/src/shared/common.js +7 -80
  152. package/src/shared/hof.js +23 -17
  153. package/typedoc.json +1 -1
  154. package/@types/services/cookie-reader.d.ts +0 -4
  155. package/@types/services/http-backend/http-backend.d.ts +0 -58
  156. package/@types/services/template-cache/interface.d.ts +0 -10
  157. package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
  158. package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
  159. package/docs/static/typedoc/interfaces/Controller.html +0 -12
  160. package/docs/static/typedoc/interfaces/Directive.html +0 -37
  161. package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
  162. package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
  163. package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
  164. package/docs/static/typedoc/interfaces/Provider.html +0 -34
  165. package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
  166. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
  167. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
  168. package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
  169. package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
  170. package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
  171. package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
  172. package/docs/static/typedoc/types/DirectiveController.html +0 -2
  173. package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
  174. package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
  175. package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
  176. package/docs/static/typedoc/types/ExpandoStore.html +0 -2
  177. package/docs/static/typedoc/types/FilterFactory.html +0 -2
  178. package/docs/static/typedoc/types/FilterFn.html +0 -2
  179. package/docs/static/typedoc/types/Injectable.html +0 -4
  180. package/docs/static/typedoc/types/InjectableClass.html +0 -1
  181. package/docs/static/typedoc/types/InjectableFactory.html +0 -1
  182. package/docs/static/typedoc/types/OnChangesObject.html +0 -2
  183. package/docs/static/typedoc/types/SwapModeType.html +0 -2
  184. package/docs/static/typedoc/types/TController.html +0 -2
  185. package/docs/static/typedoc/variables/SwapMode.html +0 -11
  186. package/src/filters/limit-to.md +0 -19
  187. package/src/filters/order-by.md +0 -83
  188. package/src/router/state/README.md +0 -21
  189. package/src/services/cookie-reader.js +0 -48
  190. package/src/services/http/http.md +0 -413
  191. package/src/services/http-backend/http-backend.js +0 -158
  192. package/src/services/http-backend/http-backend.spec.js +0 -389
  193. package/src/services/sce/sce.md +0 -300
  194. package/src/services/template-cache/interface.ts +0 -10
  195. /package/src/services/{anchor-scroll.html → anchor-scroll/anchor-scroll.html} +0 -0
@@ -241,3 +241,16 @@ export interface HttpService {
241
241
  */
242
242
  pendingRequests: RequestConfig[];
243
243
  }
244
+
245
+ /**
246
+ * Represents an object of key-value pairs to be serialized into an HTTP query string.
247
+ */
248
+ export type HttpParams = Record<
249
+ string,
250
+ string | number | boolean | null | undefined | unknown[]
251
+ >;
252
+
253
+ /**
254
+ * A function that serializes an object into a URL-encoded query string.
255
+ */
256
+ export type HttpParamSerializer = (params?: HttpParams) => string;
@@ -523,7 +523,7 @@ export class LocationProvider {
523
523
  $t.$rootElement,
524
524
  /**
525
525
  *
526
- * @param {import('../../core/scope/scope.js').Scope} $rootScope
526
+ * @param {ng.Scope} $rootScope
527
527
  * @param {Element} $rootElement
528
528
  * @returns {Location}
529
529
  */
@@ -15,8 +15,7 @@ import {
15
15
  } from "../../shared/utils.js";
16
16
 
17
17
  import { snakeToCamel } from "../../shared/dom.js";
18
-
19
- /** @typedef {import("../exception/interface.ts").Interface } ErrorHandler */
18
+ import { $injectTokens as $t } from "../../injection-tokens.js";
20
19
 
21
20
  const $sceMinErr = minErr("$sce");
22
21
 
@@ -307,14 +306,14 @@ export class SceDelegateProvider {
307
306
  };
308
307
 
309
308
  this.$get = [
310
- "$injector",
311
- "$$sanitizeUri",
312
- "$exceptionHandler",
309
+ $t.$injector,
310
+ $t.$$sanitizeUri,
311
+ $t.$exceptionHandler,
313
312
  /**
314
313
  *
315
- * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
314
+ * @param {ng.InjectorService} $injector
316
315
  * @param {*} $$sanitizeUri
317
- * @param {ErrorHandler} $exceptionHandler
316
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
318
317
  * @returns
319
318
  */
320
319
  function ($injector, $$sanitizeUri, $exceptionHandler) {
@@ -333,7 +332,7 @@ export class SceDelegateProvider {
333
332
 
334
333
  /**
335
334
  * @param {string|RegExp} matcher
336
- * @param {import("../../shared/url-utils/interface").ParsedUrl} parsedUrl
335
+ * @param {import("../../shared/url-utils/interface.ts").ParsedUrl} parsedUrl
337
336
  * @return {boolean}
338
337
  */
339
338
  function matchUrl(matcher, parsedUrl) {
@@ -588,9 +587,15 @@ export function SceProvider() {
588
587
  };
589
588
 
590
589
  this.$get = [
591
- "$parse",
592
- "$sceDelegate",
593
- function ($parse, $sceDelegate) {
590
+ $t.$parse,
591
+ $t.$sceDelegate,
592
+ /**
593
+ *
594
+ * @param {ng.ParseService} $parse
595
+ * @param $sceDelegate
596
+ * @return {*}
597
+ */
598
+ ($parse, $sceDelegate) => {
594
599
  const sce = shallowCopy(SCE_CONTEXTS);
595
600
 
596
601
  /**
@@ -624,14 +629,14 @@ export function SceProvider() {
624
629
  *
625
630
  * @param {string} type The SCE context in which this result will be used.
626
631
  * @param {string} expr String expression to compile.
627
- * @return {function(context, locals)} A function which represents the compiled expression:
632
+ * @return {import("../../core/parse/interface.js").CompiledExpression} A function which represents the compiled expression:
628
633
  *
629
634
  * * `context` – `{object}` – an object against which any expressions embedded in the
630
635
  * strings are evaluated against (typically a scope object).
631
636
  * * `locals` – `{object=}` – local variables context object, useful for overriding values
632
637
  * in `context`.
633
638
  */
634
- sce.parseAs = function sceParseAs(type, expr) {
639
+ sce.parseAs = (type, expr) => {
635
640
  const parsed = $parse(expr);
636
641
  if (parsed.literal && parsed.constant) {
637
642
  return parsed;
@@ -3,11 +3,11 @@
3
3
  */
4
4
  export class TemplateCacheProvider {
5
5
  constructor() {
6
- /** @type {import('./interface.ts').TemplateCache} */
6
+ /** @type {ng.TemplateCacheService} */
7
7
  this.cache = new Map();
8
8
  }
9
9
  /**
10
- * @returns {import('./interface.ts').TemplateCache}
10
+ * @returns {ng.TemplateCacheService}
11
11
  */
12
12
  $get() {
13
13
  return this.cache;
@@ -0,0 +1,23 @@
1
+ export interface TemplateRequestService {
2
+ /**
3
+ * Downloads a template using $http and, upon success, stores the
4
+ * contents inside of $templateCache.
5
+ *
6
+ * If the HTTP request fails or the response data of the HTTP request is
7
+ * empty then a $compile error will be thrown (unless
8
+ * {ignoreRequestError} is set to true).
9
+ *
10
+ * @param tpl The template URL.
11
+ * @param ignoreRequestError Whether or not to ignore the exception
12
+ * when the request fails or the template is
13
+ * empty.
14
+ *
15
+ * @return A promise whose value is the template content.
16
+ */
17
+ (tpl: string, ignoreRequestError?: boolean): Promise<string>;
18
+
19
+ /**
20
+ * total amount of pending template requests being downloaded.
21
+ */
22
+ totalPendingRequests: number;
23
+ }
@@ -1,5 +1,5 @@
1
- import { defaultHttpResponseTransform } from "./http/http.js";
2
- import { extend, isString, minErr } from "../shared/utils.js";
1
+ import { defaultHttpResponseTransform } from "../http/http.js";
2
+ import { extend, isString, minErr } from "../../shared/utils.js";
3
3
 
4
4
  const $templateRequestMinErr = minErr("$templateRequest");
5
5
 
@@ -60,11 +60,11 @@ export function TemplateRequestProvider() {
60
60
  "$sce",
61
61
  /**
62
62
  *
63
- * @param {import('./exception/exception-handler.js').ErrorHandler} $exceptionHandler
64
- * @param {import('../services/template-cache/interface.ts').TemplateCache} $templateCache
65
- * @param {import("interface.ts").HttpService} $http
63
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
64
+ * @param {ng.TemplateCacheService} $templateCache
65
+ * @param {ng.HttpService} $http
66
66
  * @param {*} $sce
67
- * @returns
67
+ * @returns {ng.TemplateRequestService}
68
68
  */
69
69
  function ($exceptionHandler, $templateCache, $http, $sce) {
70
70
  function handleRequestFn(tpl, ignoreRequestError) {
@@ -1,5 +1,4 @@
1
1
  import { isDate, isFunction, isRegExp, isString } from "./utils.js";
2
- import { curry } from "./hof.js";
3
2
 
4
3
  export function equals(o1, o2) {
5
4
  if (o1 === o2) return true;
@@ -27,81 +26,7 @@ export function equals(o1, o2) {
27
26
  }
28
27
  return true;
29
28
  }
30
- /**
31
- * Builds proxy functions on the `to` object which pass through to the `from` object.
32
- *
33
- * For each key in `fnNames`, creates a proxy function on the `to` object.
34
- * The proxy function calls the real function on the `from` object.
35
- *
36
- *
37
- * #### Example:
38
- * This example creates an new class instance whose functions are prebound to the new'd object.
39
- * ```js
40
- * class Foo {
41
- * constructor(data) {
42
- * // Binds all functions from Foo.prototype to 'this',
43
- * // then copies them to 'this'
44
- * bindFunctions(Foo.prototype, this, this);
45
- * this.data = data;
46
- * }
47
- *
48
- * log() {
49
- * console.log(this.data);
50
- * }
51
- * }
52
- *
53
- * let myFoo = new Foo([1,2,3]);
54
- * var logit = myFoo.log;
55
- * logit(); // logs [1, 2, 3] from the myFoo 'this' instance
56
- * ```
57
- *
58
- * #### Example:
59
- * This example creates a bound version of a service function, and copies it to another object
60
- * ```
61
- *
62
- * var SomeService = {
63
- * this.data = [3, 4, 5];
64
- * this.log = function() {
65
- * console.log(this.data);
66
- * }
67
- * }
68
- *
69
- * // Constructor fn
70
- * function OtherThing() {
71
- * // Binds all functions from SomeService to SomeService,
72
- * // then copies them to 'this'
73
- * bindFunctions(SomeService, this, SomeService);
74
- * }
75
- *
76
- * let myOtherThing = new OtherThing();
77
- * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'
78
- * ```
79
- *
80
- * @param source A function that returns the source object which contains the original functions to be bound
81
- * @param target A function that returns the target object which will receive the bound functions
82
- * @param bind A function that returns the object which the functions will be bound to
83
- * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
84
- * @param latebind If true, the binding of the function is delayed until the first time it's invoked
85
- */
86
- export function createProxyFunctions(
87
- source,
88
- target,
89
- bind,
90
- fnNames,
91
- latebind = false,
92
- ) {
93
- const bindFunction = (fnName) => source()[fnName].bind(bind());
94
- const makeLateRebindFn = (fnName) =>
95
- function lateRebindFunction() {
96
- target[fnName] = bindFunction(fnName);
97
- return target[fnName].apply(null, arguments);
98
- };
99
- fnNames = fnNames || Object.keys(source());
100
- return fnNames.reduce((acc, name) => {
101
- acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);
102
- return acc;
103
- }, target);
104
- }
29
+
105
30
  /**
106
31
  * prototypal inheritance helper.
107
32
  * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
@@ -126,11 +51,13 @@ export function inherit(parent, extra) {
126
51
  /**
127
52
  * Given an array, and an item, if the item is found in the array, it removes it (in-place).
128
53
  * The same array is returned
54
+ * @param {Array} array
55
+ * @param {any} obj
56
+ * @returns {Array}
129
57
  */
130
- export const removeFrom = curry(_removeFrom);
131
- export function _removeFrom(array, obj) {
132
- const idx = array.indexOf(obj);
133
- if (idx >= 0) array.splice(idx, 1);
58
+ export function removeFrom(array, obj) {
59
+ const i = array.indexOf(obj);
60
+ if (i !== -1) array.splice(i, 1);
134
61
  return array;
135
62
  }
136
63
 
package/src/shared/hof.js CHANGED
@@ -64,15 +64,6 @@ export function compose() {
64
64
  return result;
65
65
  };
66
66
  }
67
- /**
68
- * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right
69
- * given: f(x), g(x), h(x)
70
- * let piped = pipe(f,g,h);
71
- * then, piped is: h(g(f(x)))
72
- */
73
- export function pipe() {
74
- return compose.apply(null, [].slice.call(arguments).reverse());
75
- }
76
67
 
77
68
  /**
78
69
  * Given a property name and a value, returns a function that returns a boolean based on whether
@@ -90,18 +81,33 @@ export const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
90
81
  * let propNotFound = prop("this.property.doesnt.exist");
91
82
  * propNotFound(obj) === undefined
92
83
  */
93
- export const parse = (name) =>
94
- pipe.apply(
95
- null,
96
- name.split(".").map((name) => (obj) => obj && obj[name]),
97
- );
84
+ export const parse = (path) => {
85
+ const parts = path.split(".");
86
+ return (obj) => parts.reduce((acc, key) => acc && acc[key], obj);
87
+ };
98
88
 
99
- /** Given a class, returns a Predicate function that returns true if the object is of that class */
100
- export const is = (ctor) => (obj) =>
101
- (obj != null && obj.constructor === ctor) || obj instanceof ctor;
89
+ /**
90
+ * Given a class constructor, returns a predicate function that checks
91
+ * whether a given object is an instance of that class.
92
+ *
93
+ * @param {new (...args: any[]) => any} ctor - The class constructor to check against.
94
+ * @returns {(obj: any) => boolean} A predicate function that returns true if the object is of the given class.
95
+ */
96
+ export function is(ctor) {
97
+ /**
98
+ * Checks if the provided object is an instance of the given constructor.
99
+ *
100
+ * @param {any} obj - The object to test.
101
+ * @returns {boolean} True if the object is an instance of the given class.
102
+ */
103
+ return function (obj) {
104
+ return (obj != null && obj.constructor === ctor) || obj instanceof ctor;
105
+ };
106
+ }
102
107
 
103
108
  /** Given a value, returns a function which returns the value */
104
109
  export const val = (v) => () => v;
110
+
105
111
  /**
106
112
  * Sorta like Pattern Matching (a functional programming conditional construct)
107
113
  *
package/typedoc.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "entryPoints": ["src/interface.ts"],
2
+ "entryPoints": ["src/index.ts"],
3
3
  "entryPointStrategy": "expand",
4
4
  "out": "./typedoc",
5
5
  "disableSources": true,
@@ -1,4 +0,0 @@
1
- /**
2
- * @returns {Object<String, String>} List of all cookies
3
- */
4
- export function getCookies(): any;
@@ -1,58 +0,0 @@
1
- /**
2
- * @returns
3
- */
4
- export function createHttpBackend(): (
5
- method: string,
6
- url?: string,
7
- post?: any,
8
- callback?: (
9
- arg0: number,
10
- arg1: any,
11
- arg2: string | null,
12
- arg3: string,
13
- arg4: string,
14
- ) => void,
15
- headers?: {
16
- [x: string]: string;
17
- },
18
- timeout?: number | Promise<any>,
19
- withCredentials?: boolean,
20
- responseType?: XMLHttpRequestResponseType,
21
- eventHandlers?: {
22
- [x: string]: EventListener;
23
- },
24
- uploadEventHandlers?: {
25
- [x: string]: EventListener;
26
- },
27
- ) => void;
28
- /**
29
- * HTTP backend used by the `$http` that delegates to
30
- * XMLHttpRequest object and deals with browser incompatibilities.
31
- * You should never need to use this service directly.
32
- */
33
- export class HttpBackendProvider {
34
- $get: () => (
35
- method: string,
36
- url?: string,
37
- post?: any,
38
- callback?: (
39
- arg0: number,
40
- arg1: any,
41
- arg2: string | null,
42
- arg3: string,
43
- arg4: string,
44
- ) => void,
45
- headers?: {
46
- [x: string]: string;
47
- },
48
- timeout?: number | Promise<any>,
49
- withCredentials?: boolean,
50
- responseType?: XMLHttpRequestResponseType,
51
- eventHandlers?: {
52
- [x: string]: EventListener;
53
- },
54
- uploadEventHandlers?: {
55
- [x: string]: EventListener;
56
- },
57
- ) => void;
58
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * A cache interface for mapping template urls to their XHR responses.
3
- */
4
- export interface TemplateCache {
5
- get(key: string): any | undefined;
6
- set(key: string, value: any): this;
7
- has(key: string): boolean;
8
- delete(key: string): boolean;
9
- clear(): void;
10
- }
@@ -1,6 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ChangesObject | AngularTS</title><meta name="description" content="Documentation for AngularTS"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">AngularTS</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">ChangesObject</a></li></ul><h1>Interface ChangesObject&lt;T&gt;</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Describes the changes in component bindings during <code>$onChanges</code>.</p>
2
- </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">ChangesObject</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#currentvalue">currentValue</a><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#isfirstchange">isFirstChange</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="t"><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</span></span></li></ul></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#currentvalue" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>current<wbr/>Value</span></a>
3
- <a href="#isfirstchange" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>First<wbr/>Change</span></a>
4
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="currentvalue"><span>current<wbr/>Value</span><a href="#currentvalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">currentValue</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a></div><div class="tsd-comment tsd-typography"><p>New value of the binding</p>
5
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="isfirstchange"><span>is<wbr/>First<wbr/>Change</span><a href="#isfirstchange" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">isFirstChange</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Whether this is the first change</p>
6
- </div></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#currentvalue"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>current<wbr/>Value</span></a><a href="#isfirstchange"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>First<wbr/>Change</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">AngularTS</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ComponentOptions | AngularTS</title><meta name="description" content="Documentation for AngularTS"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">AngularTS</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">ComponentOptions</a></li></ul><h1>Interface ComponentOptions</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Defines a component's configuration object.</p>
2
- </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">ComponentOptions</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#bindings">bindings</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#controller">controller</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Injectable.html" class="tsd-signature-type tsd-kind-type-alias">Injectable</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#controlleras">controllerAs</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#require">require</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#template">template</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Injectable.html" class="tsd-signature-type tsd-kind-type-alias">Injectable</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#templateurl">templateUrl</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Injectable.html" class="tsd-signature-type tsd-kind-type-alias">Injectable</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#transclude">transclude</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#bindings" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bindings?</span></a>
3
- <a href="#controller" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>controller?</span></a>
4
- <a href="#controlleras" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>controller<wbr/>As?</span></a>
5
- <a href="#require" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>require?</span></a>
6
- <a href="#template" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>template?</span></a>
7
- <a href="#templateurl" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>template<wbr/>Url?</span></a>
8
- <a href="#transclude" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>transclude?</span></a>
9
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="bindings"><code class="tsd-tag">Optional</code><span>bindings</span><a href="#bindings" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bindings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Binding definitions (e.g., <code>@</code>, <code>=</code>, <code>&lt;</code>)</p>
10
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="controller"><code class="tsd-tag">Optional</code><span>controller</span><a href="#controller" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">controller</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Injectable.html" class="tsd-signature-type tsd-kind-type-alias">Injectable</a></div><div class="tsd-comment tsd-typography"><p>Controller function or injectable string reference</p>
11
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="controlleras"><code class="tsd-tag">Optional</code><span>controller<wbr/>As</span><a href="#controlleras" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">controllerAs</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Alias name for the controller in templates</p>
12
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="require"><code class="tsd-tag">Optional</code><span>require</span><a href="#require" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">require</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Required controllers from other directives</p>
13
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="template"><code class="tsd-tag">Optional</code><span>template</span><a href="#template" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">template</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Injectable.html" class="tsd-signature-type tsd-kind-type-alias">Injectable</a></div><div class="tsd-comment tsd-typography"><p>Inline HTML template</p>
14
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="templateurl"><code class="tsd-tag">Optional</code><span>template<wbr/>Url</span><a href="#templateurl" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">templateUrl</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../types/Injectable.html" class="tsd-signature-type tsd-kind-type-alias">Injectable</a></div><div class="tsd-comment tsd-typography"><p>URL of the HTML template</p>
15
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="transclude"><code class="tsd-tag">Optional</code><span>transclude</span><a href="#transclude" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">transclude</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Enable transclusion or specify named slots</p>
16
- </div></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bindings"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bindings</span></a><a href="#controller"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>controller</span></a><a href="#controlleras"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>controller<wbr/>As</span></a><a href="#require"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>require</span></a><a href="#template"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>template</span></a><a href="#templateurl"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>template<wbr/>Url</span></a><a href="#transclude"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>transclude</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">AngularTS</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Controller | AngularTS</title><meta name="description" content="Documentation for AngularTS"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">AngularTS</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">Controller</a></li></ul><h1>Interface Controller</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>AngularTS component lifecycle interface.</p>
2
- </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">Controller</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#onchanges">$onChanges</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">changes</span><span class="tsd-signature-symbol">:</span> <a href="../types/OnChangesObject.html" class="tsd-signature-type tsd-kind-type-alias">OnChangesObject</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#ondestroy">$onDestroy</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#oninit">$onInit</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#postlink">$postLink</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#name">name</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#onchanges" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$on<wbr/>Changes?</span></a>
3
- <a href="#ondestroy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$on<wbr/>Destroy?</span></a>
4
- <a href="#oninit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$on<wbr/>Init?</span></a>
5
- <a href="#postlink" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$post<wbr/>Link?</span></a>
6
- <a href="#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name?</span></a>
7
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="onchanges"><code class="tsd-tag">Optional</code><span>$on<wbr/>Changes</span><a href="#onchanges" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">$onChanges</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">changes</span><span class="tsd-signature-symbol">:</span> <a href="../types/OnChangesObject.html" class="tsd-signature-type tsd-kind-type-alias">OnChangesObject</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Called when one-way bindings are updated</p>
8
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="ondestroy"><code class="tsd-tag">Optional</code><span>$on<wbr/>Destroy</span><a href="#ondestroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">$onDestroy</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Called before the controller is destroyed</p>
9
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="oninit"><code class="tsd-tag">Optional</code><span>$on<wbr/>Init</span><a href="#oninit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">$onInit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Called when the controller is initialized</p>
10
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="postlink"><code class="tsd-tag">Optional</code><span>$post<wbr/>Link</span><a href="#postlink" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">$postLink</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Called after the component is linked</p>
11
- </div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="name"><code class="tsd-tag">Optional</code><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Optional controller name (used in debugging)</p>
12
- </div></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#onchanges"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$on<wbr/>Changes</span></a><a href="#ondestroy"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$on<wbr/>Destroy</span></a><a href="#oninit"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$on<wbr/>Init</span></a><a href="#postlink"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>$post<wbr/>Link</span></a><a href="#name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">AngularTS</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>