@angular-wave/angular.ts 0.0.35 → 0.0.37

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 (480) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/Makefile +4 -0
  3. package/dist/angular-ts.esm.js +1 -1
  4. package/dist/angular-ts.umd.js +1 -1
  5. package/index.html +3 -102
  6. package/package.json +2 -2
  7. package/playwright.config.ts +4 -3
  8. package/public/public/my_other_directive.html +1 -0
  9. package/{test → src}/angular.spec.js +6 -6
  10. package/src/animations/animate-css-driver.js +1 -1
  11. package/src/animations/animate-queue.js +1 -1
  12. package/src/animations/animation.js +1 -1
  13. package/src/animations/shared.js +1 -1
  14. package/{test → src}/binding.spec.js +3 -3
  15. package/src/core/{animate-runner.js → animate/animate-runner.js} +1 -1
  16. package/src/core/animate/animate.html +18 -0
  17. package/src/core/{animate.js → animate/animate.js} +4 -5
  18. package/{test/core → src/core/animate}/animate.spec.js +1 -1
  19. package/src/core/cache/cache-factor.html +18 -0
  20. package/{test/core → src/core/cache}/cache-factor.spec.js +2 -2
  21. package/src/core/cache/cache-factor.test.js +11 -0
  22. package/src/core/compile/compile.html +18 -0
  23. package/src/core/{compile.js → compile/compile.js} +25 -21
  24. package/{test/core → src/core/compile}/compile.spec.js +65 -68
  25. package/src/core/compile/compile.test.js +12 -0
  26. package/src/core/controller/controller.html +21 -0
  27. package/src/core/{controller.js → controller/controller.js} +1 -1
  28. package/{test/core/controller-provider.spec.js → src/core/controller/controller.spec.js} +2 -2
  29. package/src/core/controller/controller.test.js +11 -0
  30. package/{test → src}/core/cookie-reader.spec.js +2 -2
  31. package/{test → src}/core/document.spec.js +3 -3
  32. package/src/core/filter/filter.html +18 -0
  33. package/src/core/{filter.js → filter/filter.js} +5 -5
  34. package/{test/core → src/core/filter}/filter.spec.js +2 -2
  35. package/src/core/filter/filter.test.js +11 -0
  36. package/src/core/interpolate/interpolate.html +21 -0
  37. package/src/core/{interpolate.js → interpolate/interpolate.js} +1 -1
  38. package/{test/core → src/core/interpolate}/interpolate.spec.js +2 -2
  39. package/src/core/interpolate/interpolate.test.js +11 -0
  40. package/src/core/{interval-factory.js → interval/interval-factory.js} +2 -1
  41. package/src/core/interval/interval.html +18 -0
  42. package/src/core/{interval.js → interval/interval.js} +3 -2
  43. package/{test/core → src/core/interval}/interval.spec.js +6 -10
  44. package/src/core/interval/interval.test.js +12 -0
  45. package/src/core/{location.js → location/location.js} +4 -3
  46. package/{test/core → src/core/location}/location.spec.js +3 -3
  47. package/{test → src}/core/on.spec.js +3 -3
  48. package/src/core/parser/parse.js +2 -3
  49. package/{test/core → src/core/parser}/parse.spec.js +4 -4
  50. package/{test → src}/core/prop.spec.js +4 -4
  51. package/{test/core → src/core/pubsub}/pubsub.spec.js +1 -1
  52. package/src/core/{q.js → q/q.js} +1 -1
  53. package/{test/core → src/core/q}/q.spec.js +3 -3
  54. package/{test → src}/core/root-element.spec.js +3 -3
  55. package/src/core/{sanitize-uri.js → sanitize/sanitize-uri.js} +2 -2
  56. package/{test/core → src/core/sanitize}/sanitize-uri.spec.js +1 -1
  57. package/src/core/{sce.js → sce/sce.js} +3 -3
  58. package/{test/core → src/core/sce}/sce.spec.js +3 -3
  59. package/src/core/{root-scope.js → scope/scope.js} +33 -35
  60. package/{test/core → src/core/scope}/scope.spec.js +5 -5
  61. package/src/core/{timeout.js → timeout/timeout.js} +2 -2
  62. package/{test/core → src/core/timeout}/timeout.spec.js +2 -2
  63. package/src/core/{urlUtils.js → url-utils/url-utils.js} +1 -1
  64. package/{test/core → src/core/url-utils}/url-utils.spec.js +1 -1
  65. package/src/directive/attrs/attrs.html +18 -0
  66. package/src/directive/{attrs.js → attrs/attrs.js} +3 -3
  67. package/{test/directive/scrset.spec.js → src/directive/attrs/attrs.spec.js} +3 -3
  68. package/{test/directive → src/directive/attrs}/boolean.spec.js +3 -3
  69. package/{test/directive → src/directive/attrs}/element-style.spec.js +3 -3
  70. package/src/directive/attrs/src.html +18 -0
  71. package/{test/directive → src/directive/attrs}/src.spec.js +3 -3
  72. package/src/directive/attrs/src.test.js +11 -0
  73. package/src/directive/bind/bind.html +18 -0
  74. package/src/directive/{bind.js → bind/bind.js} +1 -1
  75. package/{test/directive → src/directive/bind}/bind.spec.js +3 -3
  76. package/src/directive/bind/bind.test.js +11 -0
  77. package/{test/sanitize → src/directive/bind}/bing-html.spec.js +3 -3
  78. package/src/directive/change/change.html +18 -0
  79. package/{test/directive → src/directive/change}/change.spec.js +3 -3
  80. package/src/directive/change/change.test.js +11 -0
  81. package/src/directive/class/class.html +18 -0
  82. package/src/directive/{class.js → class/class.js} +3 -3
  83. package/{test/directive → src/directive/class}/class.spec.js +5 -5
  84. package/src/directive/class/class.test.js +11 -0
  85. package/src/directive/cloak/cloak.html +18 -0
  86. package/{test/directive → src/directive/cloak}/cloak.spec.js +3 -3
  87. package/src/directive/cloak/cloak.test.js +11 -0
  88. package/src/directive/controller/controller.html +21 -0
  89. package/{test/directive → src/directive/controller}/controller.spec.js +5 -5
  90. package/src/directive/controller/controller.test.js +11 -0
  91. package/{test/directive → src/directive/events}/click.spec.js +3 -3
  92. package/{test/directive → src/directive/events}/event.spec.js +4 -4
  93. package/src/directive/events/events.html +18 -0
  94. package/src/directive/{events.js → events/events.js} +2 -2
  95. package/src/directive/events/events.test.js +11 -0
  96. package/src/directive/form/form.html +18 -0
  97. package/src/directive/{form.js → form/form.js} +2 -2
  98. package/{test/directive → src/directive/form}/form.spec.js +5 -5
  99. package/src/directive/form/form.test.js +11 -0
  100. package/src/directive/if/if.html +18 -0
  101. package/src/directive/{if.js → if/if.js} +2 -1
  102. package/src/directive/if/if.md +77 -0
  103. package/{test/directive → src/directive/if}/if.spec.js +16 -16
  104. package/src/directive/if/if.test.js +12 -0
  105. package/src/directive/include/include.html +18 -0
  106. package/src/directive/{include.js → include/include.js} +2 -2
  107. package/{test/directive → src/directive/include}/include.spec.js +52 -71
  108. package/src/directive/include/include.test.js +12 -0
  109. package/src/directive/init/init.html +18 -0
  110. package/{test/directive → src/directive/init}/init.spec.js +4 -4
  111. package/src/directive/init/init.test.js +11 -0
  112. package/src/directive/input/input.html +18 -0
  113. package/src/directive/{input.js → input/input.js} +2 -2
  114. package/{test/directive → src/directive/input}/input.spec.js +5 -9
  115. package/src/directive/input/input.test.js +11 -0
  116. package/src/directive/list/list.html +18 -0
  117. package/src/directive/{list.js → list/list.js} +1 -1
  118. package/{test/directive → src/directive/list}/list.spec.js +3 -3
  119. package/src/directive/list/list.test.js +11 -0
  120. package/src/directive/model/model.html +18 -0
  121. package/src/directive/{model.js → model/model.js} +10 -6
  122. package/{test/directive → src/directive/model}/model.spec.js +8 -8
  123. package/src/directive/model/model.test.js +11 -0
  124. package/src/directive/model-options/model-option.test.js +11 -0
  125. package/src/directive/model-options/model-options.html +21 -0
  126. package/src/directive/{model-options.js → model-options/model-options.js} +1 -1
  127. package/{test/directive → src/directive/model-options}/model-options.spec.js +7 -7
  128. package/src/directive/non-bindable/non-bindable.html +21 -0
  129. package/{test/directive → src/directive/non-bindable}/non-bindable.spec.js +3 -3
  130. package/src/directive/non-bindable/non-bindable.test.js +11 -0
  131. package/src/directive/options/options.html +21 -0
  132. package/src/directive/{options.js → options/options.js} +8 -6
  133. package/{test/directive → src/directive/options}/options.spec.js +5 -5
  134. package/src/directive/options/options.test.js +11 -0
  135. package/src/directive/ref/href.html +18 -0
  136. package/{test/directive → src/directive/ref}/href.spec.js +4 -4
  137. package/src/directive/ref/href.test.js +17 -0
  138. package/src/directive/ref/ref.html +18 -0
  139. package/src/directive/{ref.js → ref/ref.js} +1 -1
  140. package/{test/directive → src/directive/ref}/ref.spec.js +2 -2
  141. package/src/directive/repeat/repeat.html +18 -0
  142. package/src/directive/{repeat.js → repeat/repeat.js} +13 -13
  143. package/{test/directive → src/directive/repeat}/repeat.spec.js +8 -9
  144. package/src/directive/repeat/repeat.test.js +11 -0
  145. package/src/directive/script/script.html +18 -0
  146. package/{test/directive → src/directive/script}/script.spec.js +3 -3
  147. package/src/directive/script/script.test.js +11 -0
  148. package/src/directive/select/select.html +18 -0
  149. package/src/directive/{select.js → select/select.js} +2 -2
  150. package/{test/directive → src/directive/select}/select.spec.js +5 -5
  151. package/src/directive/select/select.test.js +11 -0
  152. package/src/directive/show-hide/show-hide.html +21 -0
  153. package/{test/directive → src/directive/show-hide}/show-hide.spec.js +3 -3
  154. package/src/directive/show-hide/show-hide.test.js +11 -0
  155. package/src/directive/style/style.html +18 -0
  156. package/{test/directive → src/directive/style}/style.spec.js +3 -3
  157. package/src/directive/style/style.test.js +11 -0
  158. package/src/directive/switch/switch.html +18 -0
  159. package/src/directive/{switch.js → switch/switch.js} +3 -3
  160. package/{test/directive → src/directive/switch}/switch.spec.js +3 -3
  161. package/src/directive/switch/switch.test.js +11 -0
  162. package/src/directive/{transclude.js → transclude/transclude.js} +2 -2
  163. package/src/directive/validators/validators.html +21 -0
  164. package/src/directive/{validators.js → validators/validators.js} +3 -3
  165. package/{test/directive → src/directive/validators}/validators.spec.js +3 -3
  166. package/src/directive/validators/validators.test.js +11 -0
  167. package/src/exts/aria/aria.html +21 -0
  168. package/src/exts/{aria.js → aria/aria.js} +1 -1
  169. package/{test → src/exts}/aria/aria.spec.js +3 -3
  170. package/src/exts/aria/aria.test.js +11 -0
  171. package/src/exts/messages/messages.html +21 -0
  172. package/src/exts/{messages.js → messages/messages.js} +1 -1
  173. package/{test → src/exts}/messages/messages.spec.js +5 -5
  174. package/src/exts/messages/messages.test.js +11 -0
  175. package/{test/filter → src/filters}/filter.spec.js +10 -5
  176. package/{test/filter → src/filters}/filters.spec.js +3 -3
  177. package/{test/filter → src/filters}/limit-to.spec.js +3 -3
  178. package/{test/filter → src/filters}/order-by.spec.js +2 -2
  179. package/src/injector.js +1 -2
  180. package/{test → src}/injector.spec.js +4 -4
  181. package/src/loader.js +2 -2
  182. package/{test → src}/loader.spec.js +2 -2
  183. package/src/public.js +48 -45
  184. package/{test → src}/public.spec.js +2 -2
  185. package/src/router/common/glob.html +18 -0
  186. package/{test/router → src/router/common}/glob.spec.js +1 -1
  187. package/src/router/common/glob.test.js +11 -0
  188. package/src/router/directives/view-directive.js +1 -1
  189. package/{test → src}/router/services.spec.js +2 -2
  190. package/src/router/state/state-service.js +1 -1
  191. package/{test/router/ng-state-builder.spec.js → src/router/state-builder.spec.js} +1 -1
  192. package/{test → src}/router/state-directives.spec.js +3 -3
  193. package/{test → src}/router/state-filter.spec.js +2 -2
  194. package/{test → src}/router/state.spec.js +5 -5
  195. package/{test → src}/router/template-factory.spec.js +3 -3
  196. package/src/router/transition/transition-hook.js +1 -1
  197. package/{test → src}/router/url-service.spec.js +4 -4
  198. package/{test → src}/router/view-directive.spec.js +3 -3
  199. package/{test → src}/router/view-hook.spec.js +3 -3
  200. package/{test → src}/router/view-scroll.spec.js +3 -3
  201. package/{test → src}/router/view.spec.js +12 -12
  202. package/src/services/browser.js +2 -2
  203. package/src/services/cache-factory.js +5 -11
  204. package/src/services/document.js +1 -1
  205. package/src/services/{http.js → http/http.js} +5 -6
  206. package/{test/core → src/services/http}/http.spec.js +3 -3
  207. package/{test/core → src/services/http}/template-request.spec.js +2 -2
  208. package/src/services/{http-backend.js → http-backend/http-backend.js} +2 -2
  209. package/{test/core → src/services/http-backend}/http-backend.spec.js +3 -3
  210. package/src/services/template-request.js +1 -1
  211. package/{test → src}/shared/common.spec.js +4 -4
  212. package/{test → src}/shared/hof.spec.js +1 -1
  213. package/src/shared/jqlite/jqlite.html +18 -0
  214. package/src/{jqLite.js → shared/jqlite/jqlite.js} +2 -2
  215. package/{test → src/shared/jqlite}/jqlite.spec.js +7 -7
  216. package/src/shared/jqlite/jqlite.test.js +11 -0
  217. package/{test → src/shared}/min-err.spec.js +2 -2
  218. package/{test → src}/shared/strings.spec.js +1 -1
  219. package/{test → src/shared}/test-utils.js +1 -1
  220. package/src/shared/utils.js +3 -18
  221. package/{test → src}/shared/utils.spec.js +1 -1
  222. package/tsconfig.json +1 -1
  223. package/types/animations/animate-cache.d.ts +12 -0
  224. package/types/animations/animate-children-directive.d.ts +84 -0
  225. package/types/animations/animate-swap.d.ts +103 -0
  226. package/types/animations/animation.d.ts +14 -0
  227. package/types/animations/module.d.ts +750 -0
  228. package/types/animations/raf-scheduler.d.ts +5 -0
  229. package/types/animations/shared.d.ts +65 -0
  230. package/types/constants.d.ts +18 -0
  231. package/types/core/animate-css.d.ts +25 -0
  232. package/types/core/cache.d.ts +25 -0
  233. package/types/core/compile.d.ts +206 -0
  234. package/types/core/controller.d.ts +42 -0
  235. package/types/core/exception-handler.d.ts +46 -0
  236. package/types/core/filter.d.ts +9 -0
  237. package/types/core/interpolate.d.ts +83 -0
  238. package/types/core/interval-factory.d.ts +21 -0
  239. package/types/core/interval.d.ts +4 -0
  240. package/types/core/location.d.ts +234 -0
  241. package/types/core/pubsub.d.ts +164 -0
  242. package/types/core/q.d.ts +33 -0
  243. package/types/core/root-scope.d.ts +754 -0
  244. package/types/core/sanitize-uri.d.ts +57 -0
  245. package/types/core/sce.d.ts +432 -0
  246. package/types/core/task-tracker-factory.d.ts +50 -0
  247. package/types/core/timeout.d.ts +31 -0
  248. package/types/core/urlUtils.d.ts +98 -0
  249. package/types/directive/attrs.d.ts +176 -0
  250. package/types/directive/bind.d.ts +21 -0
  251. package/types/directive/change.d.ts +4 -0
  252. package/types/directive/class.d.ts +125 -0
  253. package/types/directive/cloak.d.ts +4 -0
  254. package/types/directive/controller.d.ts +6 -0
  255. package/types/directive/events.d.ts +12 -0
  256. package/types/directive/form.d.ts +230 -0
  257. package/types/directive/if.d.ts +17 -0
  258. package/types/directive/include.d.ts +33 -0
  259. package/types/directive/init.d.ts +4 -0
  260. package/types/directive/input.d.ts +192 -0
  261. package/types/directive/list.d.ts +4 -0
  262. package/types/directive/model.d.ts +672 -0
  263. package/types/directive/non-bindable.d.ts +5 -0
  264. package/types/directive/options.d.ts +16 -0
  265. package/types/directive/ref.d.ts +11 -0
  266. package/types/directive/repeat.d.ts +23 -0
  267. package/types/directive/script.d.ts +23 -0
  268. package/types/directive/show-hide.d.ts +234 -0
  269. package/types/directive/style.d.ts +4 -0
  270. package/types/directive/switch.d.ts +23 -0
  271. package/types/directive/transclude.d.ts +15 -0
  272. package/types/directive/validators.d.ts +173 -0
  273. package/types/exts/aria.d.ts +1 -0
  274. package/types/exts/messages.d.ts +1 -0
  275. package/types/filters/filter.d.ts +4 -0
  276. package/types/filters/filters.d.ts +38 -0
  277. package/types/filters/limit-to.d.ts +4 -0
  278. package/types/filters/order-by.d.ts +11 -0
  279. package/types/jqLite.d.ts +57 -0
  280. package/types/router/common/coreservices.d.ts +4 -0
  281. package/types/router/common/glob.d.ts +60 -0
  282. package/types/router/common/queue.d.ts +15 -0
  283. package/types/router/common/trace.d.ts +72 -0
  284. package/types/router/directives/view-directive.d.ts +160 -0
  285. package/types/router/globals.d.ts +30 -0
  286. package/types/router/hooks/core-resolvables.d.ts +2 -0
  287. package/types/router/hooks/ignored-transition.d.ts +1 -0
  288. package/types/router/hooks/invalid-transition.d.ts +1 -0
  289. package/types/router/hooks/lazy-load.d.ts +42 -0
  290. package/types/router/hooks/on-enter-exit-retain.d.ts +3 -0
  291. package/types/router/hooks/redirect-to.d.ts +4 -0
  292. package/types/router/hooks/resolve.d.ts +4 -0
  293. package/types/router/hooks/update-globals.d.ts +1 -0
  294. package/types/router/hooks/url.d.ts +5 -0
  295. package/types/router/hooks/views.d.ts +5 -0
  296. package/types/router/index.d.ts +1 -17
  297. package/types/router/injectables.d.ts +1 -0
  298. package/types/router/params/param-factory.d.ts +8 -0
  299. package/types/router/params/param-type.d.ts +65 -0
  300. package/types/router/params/param-types.d.ts +36 -0
  301. package/types/router/params/param.d.ts +41 -0
  302. package/types/router/params/state-params.d.ts +12 -0
  303. package/types/router/path/path-node.d.ts +45 -0
  304. package/types/router/path/path-utils.d.ts +83 -0
  305. package/types/router/resolve/resolvable.d.ts +50 -0
  306. package/types/router/resolve/resolve-context.d.ts +102 -0
  307. package/types/router/services.d.ts +12 -13
  308. package/types/router/state/state-builder.d.ts +89 -0
  309. package/types/router/state/state-matcher.d.ts +7 -0
  310. package/types/router/state/state-object.d.ts +72 -0
  311. package/types/router/state/state-queue-manager.d.ts +19 -0
  312. package/types/router/state/state-registry.d.ts +118 -0
  313. package/types/router/state/state-service.d.ts +419 -0
  314. package/types/router/state/target-state.d.ts +102 -0
  315. package/types/router/state/views.d.ts +50 -0
  316. package/types/router/state-filters.d.ts +15 -0
  317. package/types/router/state-provider.d.ts +123 -0
  318. package/types/router/template-factory.d.ts +124 -0
  319. package/types/router/transition/hook-builder.d.ts +40 -0
  320. package/types/router/transition/hook-registry.d.ts +102 -0
  321. package/types/router/transition/interface.d.ts +11 -0
  322. package/types/router/transition/reject-factory.d.ts +42 -0
  323. package/types/router/transition/transition-event-type.d.ts +24 -0
  324. package/types/router/transition/transition-hook.d.ts +86 -0
  325. package/types/router/transition/transition-service.d.ts +115 -0
  326. package/types/router/transition/transition.d.ts +390 -0
  327. package/types/router/url/url-config.d.ts +100 -0
  328. package/types/router/url/url-matcher.d.ts +175 -0
  329. package/types/router/url/url-rule.d.ts +146 -0
  330. package/types/router/url/url-rules.d.ts +229 -0
  331. package/types/router/url/url-service.d.ts +278 -0
  332. package/types/router/view/view.d.ts +137 -0
  333. package/types/router/view-scroll.d.ts +5 -0
  334. package/types/services/anchor-scroll.d.ts +11 -0
  335. package/types/services/browser.d.ts +150 -0
  336. package/types/services/cache-factory.d.ts +143 -0
  337. package/types/services/cookie-reader.d.ts +17 -0
  338. package/types/services/document.d.ts +38 -0
  339. package/types/services/http-backend.d.ts +78 -0
  340. package/types/services/http.d.ts +157 -0
  341. package/types/services/log.d.ts +63 -0
  342. package/types/services/template-request.d.ts +69 -0
  343. package/types/shared/common.d.ts +216 -0
  344. package/types/shared/hof.d.ts +131 -0
  345. package/types/shared/predicates.d.ts +15 -0
  346. package/types/shared/strings.d.ts +55 -0
  347. package/types/shared/utils.d.ts +630 -0
  348. package/types-back/README.md +2 -0
  349. package/{types → types-back}/index.d.ts +17 -12
  350. package/types-back/router/index.d.ts +17 -0
  351. package/types-back/router/services.d.ts +15 -0
  352. package/e2e/unit.spec.ts +0 -16
  353. package/public/my_other_directive.html +0 -1
  354. package/src/directive/if.md +0 -80
  355. package/test/build-test.html +0 -14
  356. package/test/mock-test.html +0 -13
  357. package/test/module-test.html +0 -58
  358. /package/{test → public}/jasmine/jasmine-5.1.2/boot0.js +0 -0
  359. /package/{test → public}/jasmine/jasmine-5.1.2/boot1.js +0 -0
  360. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine-html.js +0 -0
  361. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine.css +0 -0
  362. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine.js +0 -0
  363. /package/{test → public}/jasmine/jasmine-5.1.2/jasmine_favicon.png +0 -0
  364. /package/{test → public}/jasmine/jasmine-browser.json +0 -0
  365. /package/{test → public}/jasmine/jasmine.json +0 -0
  366. /package/public/{README.md → public/README.md} +0 -0
  367. /package/public/{circle.html → public/circle.html} +0 -0
  368. /package/public/{my_child_directive.html → public/my_child_directive.html} +0 -0
  369. /package/public/{my_directive.html → public/my_directive.html} +0 -0
  370. /package/public/{test.html → public/test.html} +0 -0
  371. /package/src/core/{animate-css.js → animate/animate-css.js} +0 -0
  372. /package/src/core/{cache.js → cache/cache.js} +0 -0
  373. /package/src/core/{compile.md → compile/compile.md} +0 -0
  374. /package/src/core/{filter.md → filter/filter.md} +0 -0
  375. /package/src/core/{interval.md → interval/interval.md} +0 -0
  376. /package/src/core/{pubsub.js → pubsub/pubsub.js} +0 -0
  377. /package/src/directive/{bind.md → bind/bind.md} +0 -0
  378. /package/src/directive/{change.js → change/change.js} +0 -0
  379. /package/src/directive/{change.md → change/change.md} +0 -0
  380. /package/src/directive/{cloak.js → cloak/cloak.js} +0 -0
  381. /package/src/directive/{cloak.md → cloak/cloak.md} +0 -0
  382. /package/src/directive/{controller.js → controller/controller.js} +0 -0
  383. /package/src/directive/{controller.md → controller/controller.md} +0 -0
  384. /package/src/directive/{events.md → events/events.md} +0 -0
  385. /package/src/directive/{include.md → include/include.md} +0 -0
  386. /package/src/directive/{init.js → init/init.js} +0 -0
  387. /package/src/directive/{init.md → init/init.md} +0 -0
  388. /package/src/directive/{list.md → list/list.md} +0 -0
  389. /package/src/directive/{non-bindable.js → non-bindable/non-bindable.js} +0 -0
  390. /package/src/directive/{non-bindable.md → non-bindable/non-bindable.md} +0 -0
  391. /package/src/directive/{repeat.md → repeat/repeat.md} +0 -0
  392. /package/src/directive/{script.js → script/script.js} +0 -0
  393. /package/src/directive/{show-hide.js → show-hide/show-hide.js} +0 -0
  394. /package/src/directive/{style.js → style/style.js} +0 -0
  395. /package/src/directive/{style.md → style/style.md} +0 -0
  396. /package/src/directive/{switch.md → switch/switch.md} +0 -0
  397. /package/src/exts/{messages.md → messages/messages.md} +0 -0
  398. /package/{test/module-test.js → src/services/http/http.html} +0 -0
  399. /package/src/{constants.js → shared/constants.js} +0 -0
  400. /package/{types → types-back}/angular.d.ts +0 -0
  401. /package/{types → types-back}/global.d.ts +0 -0
  402. /package/{types → types-back}/jqlite.d.ts +0 -0
  403. /package/{types → types-back}/router/core/common/common.d.ts +0 -0
  404. /package/{types → types-back}/router/core/common/coreservices.d.ts +0 -0
  405. /package/{types → types-back}/router/core/common/glob.d.ts +0 -0
  406. /package/{types → types-back}/router/core/common/hof.d.ts +0 -0
  407. /package/{types → types-back}/router/core/common/index.d.ts +0 -0
  408. /package/{types → types-back}/router/core/common/predicates.d.ts +0 -0
  409. /package/{types → types-back}/router/core/common/queue.d.ts +0 -0
  410. /package/{types → types-back}/router/core/common/safeConsole.d.ts +0 -0
  411. /package/{types → types-back}/router/core/common/strings.d.ts +0 -0
  412. /package/{types → types-back}/router/core/common/trace.d.ts +0 -0
  413. /package/{types → types-back}/router/core/globals.d.ts +0 -0
  414. /package/{types → types-back}/router/core/hooks/coreResolvables.d.ts +0 -0
  415. /package/{types → types-back}/router/core/hooks/ignoredTransition.d.ts +0 -0
  416. /package/{types → types-back}/router/core/hooks/invalidTransition.d.ts +0 -0
  417. /package/{types → types-back}/router/core/hooks/lazyLoad.d.ts +0 -0
  418. /package/{types → types-back}/router/core/hooks/onEnterExitRetain.d.ts +0 -0
  419. /package/{types → types-back}/router/core/hooks/redirectTo.d.ts +0 -0
  420. /package/{types → types-back}/router/core/hooks/resolve.d.ts +0 -0
  421. /package/{types → types-back}/router/core/hooks/updateGlobals.d.ts +0 -0
  422. /package/{types → types-back}/router/core/hooks/url.d.ts +0 -0
  423. /package/{types → types-back}/router/core/hooks/views.d.ts +0 -0
  424. /package/{types → types-back}/router/core/index.d.ts +0 -0
  425. /package/{types → types-back}/router/core/interface.d.ts +0 -0
  426. /package/{types → types-back}/router/core/params/index.d.ts +0 -0
  427. /package/{types → types-back}/router/core/params/interface.d.ts +0 -0
  428. /package/{types → types-back}/router/core/params/param.d.ts +0 -0
  429. /package/{types → types-back}/router/core/params/paramType.d.ts +0 -0
  430. /package/{types → types-back}/router/core/params/paramTypes.d.ts +0 -0
  431. /package/{types → types-back}/router/core/params/stateParams.d.ts +0 -0
  432. /package/{types → types-back}/router/core/path/index.d.ts +0 -0
  433. /package/{types → types-back}/router/core/path/pathNode.d.ts +0 -0
  434. /package/{types → types-back}/router/core/path/pathUtils.d.ts +0 -0
  435. /package/{types → types-back}/router/core/resolve/index.d.ts +0 -0
  436. /package/{types → types-back}/router/core/resolve/interface.d.ts +0 -0
  437. /package/{types → types-back}/router/core/resolve/resolvable.d.ts +0 -0
  438. /package/{types → types-back}/router/core/resolve/resolveContext.d.ts +0 -0
  439. /package/{types → types-back}/router/core/router.d.ts +0 -0
  440. /package/{types → types-back}/router/core/state/index.d.ts +0 -0
  441. /package/{types → types-back}/router/core/state/interface.d.ts +0 -0
  442. /package/{types → types-back}/router/core/state/stateBuilder.d.ts +0 -0
  443. /package/{types → types-back}/router/core/state/stateMatcher.d.ts +0 -0
  444. /package/{types → types-back}/router/core/state/stateObject.d.ts +0 -0
  445. /package/{types → types-back}/router/core/state/stateQueueManager.d.ts +0 -0
  446. /package/{types → types-back}/router/core/state/stateRegistry.d.ts +0 -0
  447. /package/{types → types-back}/router/core/state/stateService.d.ts +0 -0
  448. /package/{types → types-back}/router/core/state/targetState.d.ts +0 -0
  449. /package/{types → types-back}/router/core/transition/hookBuilder.d.ts +0 -0
  450. /package/{types → types-back}/router/core/transition/hookRegistry.d.ts +0 -0
  451. /package/{types → types-back}/router/core/transition/index.d.ts +0 -0
  452. /package/{types → types-back}/router/core/transition/interface.d.ts +0 -0
  453. /package/{types → types-back}/router/core/transition/rejectFactory.d.ts +0 -0
  454. /package/{types → types-back}/router/core/transition/transition.d.ts +0 -0
  455. /package/{types → types-back}/router/core/transition/transitionEventType.d.ts +0 -0
  456. /package/{types → types-back}/router/core/transition/transitionHook.d.ts +0 -0
  457. /package/{types → types-back}/router/core/transition/transitionService.d.ts +0 -0
  458. /package/{types → types-back}/router/core/url/index.d.ts +0 -0
  459. /package/{types → types-back}/router/core/url/interface.d.ts +0 -0
  460. /package/{types → types-back}/router/core/url/urlConfig.d.ts +0 -0
  461. /package/{types → types-back}/router/core/url/urlMatcher.d.ts +0 -0
  462. /package/{types → types-back}/router/core/url/urlMatcherFactory.d.ts +0 -0
  463. /package/{types → types-back}/router/core/url/urlRouter.d.ts +0 -0
  464. /package/{types → types-back}/router/core/url/urlRule.d.ts +0 -0
  465. /package/{types → types-back}/router/core/url/urlRules.d.ts +0 -0
  466. /package/{types → types-back}/router/core/url/urlService.d.ts +0 -0
  467. /package/{types → types-back}/router/core/view/index.d.ts +0 -0
  468. /package/{types → types-back}/router/core/view/interface.d.ts +0 -0
  469. /package/{types → types-back}/router/core/view/view.d.ts +0 -0
  470. /package/{types → types-back}/router/directives/viewDirective.d.ts +0 -0
  471. /package/{types → types-back}/router/interface.d.ts +0 -0
  472. /package/{types → types-back}/router/legacy/resolveService.d.ts +0 -0
  473. /package/{types → types-back}/router/legacy/stateEvents.d.ts +0 -0
  474. /package/{types → types-back}/router/stateFilters.d.ts +0 -0
  475. /package/{types → types-back}/router/stateProvider.d.ts +0 -0
  476. /package/{types → types-back}/router/statebuilders/onEnterExitRetain.d.ts +0 -0
  477. /package/{types → types-back}/router/statebuilders/views.d.ts +0 -0
  478. /package/{types → types-back}/router/templateFactory.d.ts +0 -0
  479. /package/{types → types-back}/router/viewScroll.d.ts +0 -0
  480. /package/{test/server → utils}/express.js +0 -0
@@ -0,0 +1,750 @@
1
+ /**
2
+ * @ngdoc module
3
+ * @name ngAnimate
4
+ * @description
5
+ *
6
+ * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via
7
+ * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an AngularJS app.
8
+ *
9
+ * ## Usage
10
+ * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based
11
+ * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For
12
+ * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within
13
+ * the HTML element that the animation will be triggered on.
14
+ *
15
+ * ## Directive Support
16
+ * The following directives are "animation aware":
17
+ *
18
+ * | Directive | Supported Animations |
19
+ * |-------------------------------------------------------------------------------|---------------------------------------------------------------------------|
20
+ * | {@link ng.directive:form#animations form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) |
21
+ * | {@link ngAnimate.directive:ngAnimateSwap#animations ngAnimateSwap} | enter and leave |
22
+ * | {@link ng.directive:ngClass#animations ngClass / class}​}} | add and remove |
23
+ * | {@link ng.directive:ngClassEven#animations ngClassEven} | add and remove |
24
+ * | {@link ng.directive:ngClassOdd#animations ngClassOdd} | add and remove |
25
+ * | {@link ng.directive:ngHide#animations ngHide} | add and remove (the `ng-hide` class) |
26
+ * | {@link ng.directive:ngIf#animations ngIf} | enter and leave |
27
+ * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
28
+ * | {@link module:ngMessages#animations ngMessage / ngMessageExp} | enter and leave |
29
+ * | {@link module:ngMessages#animations ngMessages} | add and remove (the `ng-active`/`ng-inactive` classes) |
30
+ * | {@link ng.directive:ngModel#animations ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) |
31
+ * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave, and move |
32
+ * | {@link ng.directive:ngShow#animations ngShow} | add and remove (the `ng-hide` class) |
33
+ * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
34
+ * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
35
+ *
36
+ * (More information can be found by visiting the documentation associated with each directive.)
37
+ *
38
+ * For a full breakdown of the steps involved during each animation event, refer to the
39
+ * {@link ng.$animate `$animate` API docs}.
40
+ *
41
+ * ## CSS-based Animations
42
+ *
43
+ * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML
44
+ * and CSS code we can create an animation that will be picked up by AngularJS when an underlying directive performs an operation.
45
+ *
46
+ * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:
47
+ *
48
+ * ```html
49
+ * <div ng-if="bool" class="fade">
50
+ * Fade me in out
51
+ * </div>
52
+ * <button ng-click="bool=true">Fade In!</button>
53
+ * <button ng-click="bool=false">Fade Out!</button>
54
+ * ```
55
+ *
56
+ * Notice the CSS class **fade**? We can now create the CSS transition code that references this class:
57
+ *
58
+ * ```css
59
+ * /&#42; The starting CSS styles for the enter animation &#42;/
60
+ * .fade.ng-enter {
61
+ * transition:0.5s linear all;
62
+ * opacity:0;
63
+ * }
64
+ *
65
+ * /&#42; The finishing CSS styles for the enter animation &#42;/
66
+ * .fade.ng-enter.ng-enter-active {
67
+ * opacity:1;
68
+ * }
69
+ * ```
70
+ *
71
+ * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two
72
+ * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition
73
+ * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards.
74
+ *
75
+ * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions:
76
+ *
77
+ * ```css
78
+ * /&#42; now the element will fade out before it is removed from the DOM &#42;/
79
+ * .fade.ng-leave {
80
+ * transition:0.5s linear all;
81
+ * opacity:1;
82
+ * }
83
+ * .fade.ng-leave.ng-leave-active {
84
+ * opacity:0;
85
+ * }
86
+ * ```
87
+ *
88
+ * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class:
89
+ *
90
+ * ```css
91
+ * /&#42; there is no need to define anything inside of the destination
92
+ * CSS class since the keyframe will take charge of the animation &#42;/
93
+ * .fade.ng-leave {
94
+ * animation: my_fade_animation 0.5s linear;
95
+ * -webkit-animation: my_fade_animation 0.5s linear;
96
+ * }
97
+ *
98
+ * @keyframes my_fade_animation {
99
+ * from { opacity:1; }
100
+ * to { opacity:0; }
101
+ * }
102
+ *
103
+ * @-webkit-keyframes my_fade_animation {
104
+ * from { opacity:1; }
105
+ * to { opacity:0; }
106
+ * }
107
+ * ```
108
+ *
109
+ * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.
110
+ *
111
+ * ### CSS Class-based Animations
112
+ *
113
+ * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different
114
+ * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added
115
+ * and removed.
116
+ *
117
+ * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class:
118
+ *
119
+ * ```html
120
+ * <div ng-show="bool" class="fade">
121
+ * Show and hide me
122
+ * </div>
123
+ * <button ng-click="bool=!bool">Toggle</button>
124
+ *
125
+ * <style>
126
+ * .fade.ng-hide {
127
+ * transition:0.5s linear all;
128
+ * opacity:0;
129
+ * }
130
+ * </style>
131
+ * ```
132
+ *
133
+ * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since
134
+ * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.
135
+ *
136
+ * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation
137
+ * with CSS styles.
138
+ *
139
+ * ```html
140
+ * <div ng-class="{on:onOff}" class="highlight">
141
+ * Highlight this box
142
+ * </div>
143
+ * <button ng-click="onOff=!onOff">Toggle</button>
144
+ *
145
+ * <style>
146
+ * .highlight {
147
+ * transition:0.5s linear all;
148
+ * }
149
+ * .highlight.on-add {
150
+ * background:white;
151
+ * }
152
+ * .highlight.on {
153
+ * background:yellow;
154
+ * }
155
+ * .highlight.on-remove {
156
+ * background:black;
157
+ * }
158
+ * </style>
159
+ * ```
160
+ *
161
+ * We can also make use of CSS keyframes by placing them within the CSS classes.
162
+ *
163
+ *
164
+ * ### CSS Staggering Animations
165
+ * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
166
+ * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be
167
+ * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for
168
+ * the animation. The style property expected within the stagger class can either be a **transition-delay** or an
169
+ * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).
170
+ *
171
+ * ```css
172
+ * .my-animation.ng-enter {
173
+ * /&#42; standard transition code &#42;/
174
+ * transition: 1s linear all;
175
+ * opacity:0;
176
+ * }
177
+ * .my-animation.ng-enter-stagger {
178
+ * /&#42; this will have a 100ms delay between each successive leave animation &#42;/
179
+ * transition-delay: 0.1s;
180
+ *
181
+ * /&#42; As of 1.4.4, this must always be set: it signals ngAnimate
182
+ * to not accidentally inherit a delay property from another CSS class &#42;/
183
+ * transition-duration: 0s;
184
+ *
185
+ * /&#42; if you are using animations instead of transitions you should configure as follows:
186
+ * animation-delay: 0.1s;
187
+ * animation-duration: 0s; &#42;/
188
+ * }
189
+ * .my-animation.ng-enter.ng-enter-active {
190
+ * /&#42; standard transition styles &#42;/
191
+ * opacity:1;
192
+ * }
193
+ * ```
194
+ *
195
+ * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations
196
+ * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this
197
+ * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation
198
+ * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired.
199
+ *
200
+ * The following code will issue the **ng-leave-stagger** event on the element provided:
201
+ *
202
+ * ```js
203
+ * let kids = parent.children();
204
+ *
205
+ * $animate.leave(kids[0]); //stagger index=0
206
+ * $animate.leave(kids[1]); //stagger index=1
207
+ * $animate.leave(kids[2]); //stagger index=2
208
+ * $animate.leave(kids[3]); //stagger index=3
209
+ * $animate.leave(kids[4]); //stagger index=4
210
+ *
211
+ * window.requestAnimationFrame(function() {
212
+ * //stagger has reset itself
213
+ * $animate.leave(kids[5]); //stagger index=0
214
+ * $animate.leave(kids[6]); //stagger index=1
215
+ *
216
+ * $scope.$digest();
217
+ * });
218
+ * ```
219
+ *
220
+ * Stagger animations are currently only supported within CSS-defined animations.
221
+ *
222
+ * ### The `ng-animate` CSS class
223
+ *
224
+ * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation.
225
+ * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).
226
+ *
227
+ * Therefore, animations can be applied to an element using this temporary class directly via CSS.
228
+ *
229
+ * ```css
230
+ * .zipper.ng-animate {
231
+ * transition:0.5s linear all;
232
+ * }
233
+ * .zipper.ng-enter {
234
+ * opacity:0;
235
+ * }
236
+ * .zipper.ng-enter.ng-enter-active {
237
+ * opacity:1;
238
+ * }
239
+ * .zipper.ng-leave {
240
+ * opacity:1;
241
+ * }
242
+ * .zipper.ng-leave.ng-leave-active {
243
+ * opacity:0;
244
+ * }
245
+ * ```
246
+ *
247
+ * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove
248
+ * the CSS class once an animation has completed.)
249
+ *
250
+ *
251
+ * ### The `ng-[event]-prepare` class
252
+ *
253
+ * This is a special class that can be used to prevent unwanted flickering / flash of content before
254
+ * the actual animation starts. The class is added as soon as an animation is initialized, but removed
255
+ * before the actual animation starts (after waiting for a $digest).
256
+ * It is also only added for *structural* animations (`enter`, `move`, and `leave`).
257
+ *
258
+ * In practice, flickering can appear when nesting elements with structural animations such as `ngIf`
259
+ * into elements that have class-based animations such as `ngClass`.
260
+ *
261
+ * ```html
262
+ * <div ng-class="{red: myProp}">
263
+ * <div ng-class="{blue: myProp}">
264
+ * <div class="message" ng-if="myProp"></div>
265
+ * </div>
266
+ * </div>
267
+ * ```
268
+ *
269
+ * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating.
270
+ * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts:
271
+ *
272
+ * ```css
273
+ * .message.ng-enter-prepare {
274
+ * opacity: 0;
275
+ * }
276
+ * ```
277
+ *
278
+ * ### Animating between value changes
279
+ *
280
+ * Sometimes you need to animate between different expression states, whose values
281
+ * don't necessary need to be known or referenced in CSS styles.
282
+ * Unless possible with another {@link ngAnimate#directive-support "animation aware" directive},
283
+ * that specific use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as
284
+ * can be seen in {@link ngAnimate.directive:ngAnimateSwap#examples this example}.
285
+ *
286
+ * Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it
287
+ * creates a new instance of the element (including any other/child directives it may have) and
288
+ * links it to a new scope every time *swap* happens. In some cases this might not be desirable
289
+ * (e.g. for performance reasons, or when you wish to retain internal state on the original
290
+ * element instance).
291
+ *
292
+ * ## JavaScript-based Animations
293
+ *
294
+ * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared
295
+ * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the
296
+ * `module.animation()` module function we can register the animation.
297
+ *
298
+ * Let's see an example of a enter/leave animation using `ngRepeat`:
299
+ *
300
+ * ```html
301
+ * <div ng-repeat="item in items" class="slide">
302
+ * {{ item }}
303
+ * </div>
304
+ * ```
305
+ *
306
+ * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`:
307
+ *
308
+ * ```js
309
+ * myModule.animation('.slide', [function() {
310
+ * return {
311
+ * // make note that other events (like addClass/removeClass)
312
+ * // have different function input parameters
313
+ * enter: function(element, doneFn) {
314
+ * jQuery(element).fadeIn(1000, doneFn);
315
+ *
316
+ * // remember to call doneFn so that AngularJS
317
+ * // knows that the animation has concluded
318
+ * },
319
+ *
320
+ * move: function(element, doneFn) {
321
+ * jQuery(element).fadeIn(1000, doneFn);
322
+ * },
323
+ *
324
+ * leave: function(element, doneFn) {
325
+ * jQuery(element).fadeOut(1000, doneFn);
326
+ * }
327
+ * }
328
+ * }]);
329
+ * ```
330
+ *
331
+ * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as
332
+ * greensock.js and velocity.js.
333
+ *
334
+ * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define
335
+ * our animations inside of the same registered animation, however, the function input arguments are a bit different:
336
+ *
337
+ * ```html
338
+ * <div ng-class="color" class="colorful">
339
+ * this box is moody
340
+ * </div>
341
+ * <button ng-click="color='red'">Change to red</button>
342
+ * <button ng-click="color='blue'">Change to blue</button>
343
+ * <button ng-click="color='green'">Change to green</button>
344
+ * ```
345
+ *
346
+ * ```js
347
+ * myModule.animation('.colorful', [function() {
348
+ * return {
349
+ * addClass: function(element, className, doneFn) {
350
+ * // do some cool animation and call the doneFn
351
+ * },
352
+ * removeClass: function(element, className, doneFn) {
353
+ * // do some cool animation and call the doneFn
354
+ * },
355
+ * setClass: function(element, addedClass, removedClass, doneFn) {
356
+ * // do some cool animation and call the doneFn
357
+ * }
358
+ * }
359
+ * }]);
360
+ * ```
361
+ *
362
+ * ## CSS + JS Animations Together
363
+ *
364
+ * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of AngularJS,
365
+ * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking
366
+ * charge of the animation**:
367
+ *
368
+ * ```html
369
+ * <div ng-if="bool" class="slide">
370
+ * Slide in and out
371
+ * </div>
372
+ * ```
373
+ *
374
+ * ```js
375
+ * myModule.animation('.slide', [function() {
376
+ * return {
377
+ * enter: function(element, doneFn) {
378
+ * jQuery(element).slideIn(1000, doneFn);
379
+ * }
380
+ * }
381
+ * }]);
382
+ * ```
383
+ *
384
+ * ```css
385
+ * .slide.ng-enter {
386
+ * transition:0.5s linear all;
387
+ * transform:translateY(-100px);
388
+ * }
389
+ * .slide.ng-enter.ng-enter-active {
390
+ * transform:translateY(0);
391
+ * }
392
+ * ```
393
+ *
394
+ * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the
395
+ * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from
396
+ * our own JS-based animation code:
397
+ *
398
+ * ```js
399
+ * myModule.animation('.slide', ['$animateCss', function($animateCss) {
400
+ * return {
401
+ * enter: function(element) {
402
+ * // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.
403
+ * return $animateCss(element, {
404
+ * event: 'enter',
405
+ * structural: true
406
+ * });
407
+ * }
408
+ * }
409
+ * }]);
410
+ * ```
411
+ *
412
+ * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.
413
+ *
414
+ * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or
415
+ * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that
416
+ * data into `$animateCss` directly:
417
+ *
418
+ * ```js
419
+ * myModule.animation('.slide', ['$animateCss', function($animateCss) {
420
+ * return {
421
+ * enter: function(element) {
422
+ * return $animateCss(element, {
423
+ * event: 'enter',
424
+ * structural: true,
425
+ * addClass: 'maroon-setting',
426
+ * from: { height:0 },
427
+ * to: { height: 200 }
428
+ * });
429
+ * }
430
+ * }
431
+ * }]);
432
+ * ```
433
+ *
434
+ * Now we can fill in the rest via our transition CSS code:
435
+ *
436
+ * ```css
437
+ * /&#42; the transition tells ngAnimate to make the animation happen &#42;/
438
+ * .slide.ng-enter { transition:0.5s linear all; }
439
+ *
440
+ * /&#42; this extra CSS class will be absorbed into the transition
441
+ * since the $animateCss code is adding the class &#42;/
442
+ * .maroon-setting { background:red; }
443
+ * ```
444
+ *
445
+ * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over.
446
+ *
447
+ * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}.
448
+ *
449
+ * ## Animation Anchoring (via `ng-animate-ref`)
450
+ *
451
+ * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between
452
+ * structural areas of an application (like views) by pairing up elements using an attribute
453
+ * called `ng-animate-ref`.
454
+ *
455
+ * Let's say for example we have two views that are managed by `ng-view` and we want to show
456
+ * that there is a relationship between two components situated in within these views. By using the
457
+ * `ng-animate-ref` attribute we can identify that the two components are paired together and we
458
+ * can then attach an animation, which is triggered when the view changes.
459
+ *
460
+ * Say for example we have the following template code:
461
+ *
462
+ * ```html
463
+ * <!-- index.html -->
464
+ * <div ng-view class="view-animation">
465
+ * </div>
466
+ *
467
+ * <!-- home.html -->
468
+ * <a href="#/banner-page">
469
+ * <img src="./banner.jpg" class="banner" ng-animate-ref="banner">
470
+ * </a>
471
+ *
472
+ * <!-- banner-page.html -->
473
+ * <img src="./banner.jpg" class="banner" ng-animate-ref="banner">
474
+ * ```
475
+ *
476
+ * Now, when the view changes (once the link is clicked), ngAnimate will examine the
477
+ * HTML contents to see if there is a match reference between any components in the view
478
+ * that is leaving and the view that is entering. It will scan both the view which is being
479
+ * removed (leave) and inserted (enter) to see if there are any paired DOM elements that
480
+ * contain a matching ref value.
481
+ *
482
+ * The two images match since they share the same ref value. ngAnimate will now create a
483
+ * transport element (which is a clone of the first image element) and it will then attempt
484
+ * to animate to the position of the second image element in the next view. For the animation to
485
+ * work a special CSS class called `ng-anchor` will be added to the transported element.
486
+ *
487
+ * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then
488
+ * ngAnimate will handle the entire transition for us as well as the addition and removal of
489
+ * any changes of CSS classes between the elements:
490
+ *
491
+ * ```css
492
+ * .banner.ng-anchor {
493
+ * /&#42; this animation will last for 1 second since there are
494
+ * two phases to the animation (an `in` and an `out` phase) &#42;/
495
+ * transition:0.5s linear all;
496
+ * }
497
+ * ```
498
+ *
499
+ * We also **must** include animations for the views that are being entered and removed
500
+ * (otherwise anchoring wouldn't be possible since the new view would be inserted right away).
501
+ *
502
+ * ```css
503
+ * .view-animation.ng-enter, .view-animation.ng-leave {
504
+ * transition:0.5s linear all;
505
+ * position:fixed;
506
+ * left:0;
507
+ * top:0;
508
+ * width:100%;
509
+ * }
510
+ * .view-animation.ng-enter {
511
+ * transform:translateX(100%);
512
+ * }
513
+ * .view-animation.ng-leave,
514
+ * .view-animation.ng-enter.ng-enter-active {
515
+ * transform:translateX(0%);
516
+ * }
517
+ * .view-animation.ng-leave.ng-leave-active {
518
+ * transform:translateX(-100%);
519
+ * }
520
+ * ```
521
+ *
522
+ * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur:
523
+ * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away
524
+ * from its origin. Once that animation is over then the `in` stage occurs which animates the
525
+ * element to its destination. The reason why there are two animations is to give enough time
526
+ * for the enter animation on the new element to be ready.
527
+ *
528
+ * The example above sets up a transition for both the in and out phases, but we can also target the out or
529
+ * in phases directly via `ng-anchor-out` and `ng-anchor-in`.
530
+ *
531
+ * ```css
532
+ * .banner.ng-anchor-out {
533
+ * transition: 0.5s linear all;
534
+ *
535
+ * /&#42; the scale will be applied during the out animation,
536
+ * but will be animated away when the in animation runs &#42;/
537
+ * transform: scale(1.2);
538
+ * }
539
+ *
540
+ * .banner.ng-anchor-in {
541
+ * transition: 1s linear all;
542
+ * }
543
+ * ```
544
+ *
545
+ *
546
+ *
547
+ *
548
+ * ### Anchoring Demo
549
+ *
550
+ <example module="anchoringExample"
551
+ name="anchoringExample"
552
+ id="anchoringExample"
553
+ deps="angular-animate.js;angular-route.js"
554
+ animations="true">
555
+ <file name="index.html">
556
+ <a href="#!/">Home</a>
557
+ <hr />
558
+ <div class="view-container">
559
+ <div ng-view class="view"></div>
560
+ </div>
561
+ </file>
562
+ <file name="script.js">
563
+ angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])
564
+ .config(['$routeProvider', function($routeProvider) {
565
+ $routeProvider.when('/', {
566
+ templateUrl: 'home.html',
567
+ controller: 'HomeController as home'
568
+ });
569
+ $routeProvider.when('/profile/:id', {
570
+ templateUrl: 'profile.html',
571
+ controller: 'ProfileController as profile'
572
+ });
573
+ }])
574
+ .run(['$rootScope', function($rootScope) {
575
+ $rootScope.records = [
576
+ { id: 1, title: 'Miss Beulah Roob' },
577
+ { id: 2, title: 'Trent Morissette' },
578
+ { id: 3, title: 'Miss Ava Pouros' },
579
+ { id: 4, title: 'Rod Pouros' },
580
+ { id: 5, title: 'Abdul Rice' },
581
+ { id: 6, title: 'Laurie Rutherford Sr.' },
582
+ { id: 7, title: 'Nakia McLaughlin' },
583
+ { id: 8, title: 'Jordon Blanda DVM' },
584
+ { id: 9, title: 'Rhoda Hand' },
585
+ { id: 10, title: 'Alexandrea Sauer' }
586
+ ];
587
+ }])
588
+ .controller('HomeController', [function() {
589
+ //empty
590
+ }])
591
+ .controller('ProfileController', ['$rootScope', '$routeParams',
592
+ function ProfileController($rootScope, $routeParams) {
593
+ let index = parseInt($routeParams.id, 10);
594
+ let record = $rootScope.records[index - 1];
595
+
596
+ this.title = record.title;
597
+ this.id = record.id;
598
+ }]);
599
+ </file>
600
+ <file name="home.html">
601
+ <h2>Welcome to the home page</h1>
602
+ <p>Please click on an element</p>
603
+ <a class="record"
604
+ ng-href="#!/profile/{{ record.id }}"
605
+ ng-animate-ref="{{ record.id }}"
606
+ ng-repeat="record in records">
607
+ {{ record.title }}
608
+ </a>
609
+ </file>
610
+ <file name="profile.html">
611
+ <div class="profile record" ng-animate-ref="{{ profile.id }}">
612
+ {{ profile.title }}
613
+ </div>
614
+ </file>
615
+ <file name="animations.css">
616
+ .record {
617
+ display:block;
618
+ font-size:20px;
619
+ }
620
+ .profile {
621
+ background:black;
622
+ color:white;
623
+ font-size:100px;
624
+ }
625
+ .view-container {
626
+ position:relative;
627
+ }
628
+ .view-container > .view.ng-animate {
629
+ position:absolute;
630
+ top:0;
631
+ left:0;
632
+ width:100%;
633
+ min-height:500px;
634
+ }
635
+ .view.ng-enter, .view.ng-leave,
636
+ .record.ng-anchor {
637
+ transition:0.5s linear all;
638
+ }
639
+ .view.ng-enter {
640
+ transform:translateX(100%);
641
+ }
642
+ .view.ng-enter.ng-enter-active, .view.ng-leave {
643
+ transform:translateX(0%);
644
+ }
645
+ .view.ng-leave.ng-leave-active {
646
+ transform:translateX(-100%);
647
+ }
648
+ .record.ng-anchor-out {
649
+ background:red;
650
+ }
651
+ </file>
652
+ </example>
653
+ *
654
+ * ### How is the element transported?
655
+ *
656
+ * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting
657
+ * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element
658
+ * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The
659
+ * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match
660
+ * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied
661
+ * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class
662
+ * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element
663
+ * will become visible since the shim class will be removed.
664
+ *
665
+ * ### How is the morphing handled?
666
+ *
667
+ * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out
668
+ * what CSS classes differ between the starting element and the destination element. These different CSS classes
669
+ * will be added/removed on the anchor element and a transition will be applied (the transition that is provided
670
+ * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will
671
+ * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that
672
+ * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since
673
+ * the cloned element is placed inside of root element which is likely close to the body element).
674
+ *
675
+ * Note that if the root element is on the `<html>` element then the cloned node will be placed inside of body.
676
+ *
677
+ *
678
+ * ## Using $animate in your directive code
679
+ *
680
+ * So far we've explored how to feed in animations into an AngularJS application, but how do we trigger animations within our own directives in our application?
681
+ * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's
682
+ * imagine we have a greeting box that shows and hides itself when the data changes
683
+ *
684
+ * ```html
685
+ * <greeting-box active="onOrOff">Hi there</greeting-box>
686
+ * ```
687
+ *
688
+ * ```js
689
+ * ngModule.directive('greetingBox', ['$animate', function($animate) {
690
+ * return function(scope, element, attrs) {
691
+ * attrs.$observe('active', function(value) {
692
+ * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');
693
+ * });
694
+ * });
695
+ * }]);
696
+ * ```
697
+ *
698
+ * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element
699
+ * in our HTML code then we can trigger a CSS or JS animation to happen.
700
+ *
701
+ * ```css
702
+ * /&#42; normally we would create a CSS class to reference on the element &#42;/
703
+ * greeting-box.on { transition:0.5s linear all; background:green; color:white; }
704
+ * ```
705
+ *
706
+ * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's
707
+ * possible be sure to visit the {@link ng.$animate $animate service API page}.
708
+ *
709
+ *
710
+ * ## Callbacks and Promises
711
+ *
712
+ * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger
713
+ * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has
714
+ * ended by chaining onto the returned promise that animation method returns.
715
+ *
716
+ * ```js
717
+ * // somewhere within the depths of the directive
718
+ * $animate.enter(element, parent).then(function() {
719
+ * //the animation has completed
720
+ * });
721
+ * ```
722
+ *
723
+ * (Note that earlier versions of AngularJS prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case
724
+ * anymore.)
725
+ *
726
+ * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering
727
+ * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view
728
+ * routing controller to hook into that:
729
+ *
730
+ * ```js
731
+ * ngModule.controller('HomePageController', ['$animate', function($animate) {
732
+ * $animate.on('enter', ngViewElement, function(element) {
733
+ * // the animation for this route has completed
734
+ * }]);
735
+ * }])
736
+ * ```
737
+ *
738
+ * (Note that you will need to trigger a digest within the callback to get AngularJS to notice any scope-related changes.)
739
+ */
740
+ /**
741
+ * @ngdoc service
742
+ * @name $animate
743
+ * @kind object
744
+ *
745
+ * @description
746
+ * The ngAnimate `$animate` service documentation is the same for the core `$animate` service.
747
+ *
748
+ * Click here {@link ng.$animate to learn more about animations with `$animate`}.
749
+ */
750
+ export function initAnimateModule(): void;