@angular/core 2.0.0-rc.1 → 2.0.0-rc.2

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 (624) hide show
  1. package/{core.umd.js → bundles/core.umd.js} +6402 -4606
  2. package/bundles/core.umd.min.js +6 -0
  3. package/esm/index.d.ts +5 -4
  4. package/esm/index.js +9 -8
  5. package/esm/index.js.map +1 -1
  6. package/esm/private_export.d.ts +96 -11
  7. package/esm/private_export.js +39 -10
  8. package/esm/private_export.js.map +1 -1
  9. package/esm/private_export.metadata.json +1 -1
  10. package/esm/src/animation/active_animation_players_map.d.ts +11 -0
  11. package/esm/src/animation/active_animation_players_map.js +47 -0
  12. package/esm/src/animation/active_animation_players_map.js.map +1 -0
  13. package/esm/src/animation/animation_constants.d.ts +4 -0
  14. package/esm/src/animation/animation_constants.js +5 -0
  15. package/esm/src/animation/animation_constants.js.map +1 -0
  16. package/esm/src/animation/animation_constants.metadata.json +1 -0
  17. package/esm/src/animation/animation_driver.d.ts +9 -0
  18. package/esm/src/animation/animation_driver.js +9 -0
  19. package/esm/src/animation/animation_driver.js.map +1 -0
  20. package/esm/src/animation/animation_group_player.d.ts +18 -0
  21. package/esm/src/animation/animation_group_player.js +60 -0
  22. package/esm/src/animation/animation_group_player.js.map +1 -0
  23. package/esm/src/animation/animation_keyframe.d.ts +6 -0
  24. package/esm/src/animation/animation_keyframe.js +7 -0
  25. package/esm/src/animation/animation_keyframe.js.map +1 -0
  26. package/esm/src/animation/animation_player.d.ts +26 -0
  27. package/esm/src/animation/animation_player.js +30 -0
  28. package/esm/src/animation/animation_player.js.map +1 -0
  29. package/esm/src/animation/animation_sequence_player.d.ts +21 -0
  30. package/esm/src/animation/animation_sequence_player.js +64 -0
  31. package/esm/src/animation/animation_sequence_player.js.map +1 -0
  32. package/esm/src/animation/animation_style_util.d.ts +32 -0
  33. package/esm/src/animation/animation_style_util.js +91 -0
  34. package/esm/src/animation/animation_style_util.js.map +1 -0
  35. package/esm/src/animation/animation_style_util.metadata.json +1 -0
  36. package/esm/src/animation/animation_styles.d.ts +8 -0
  37. package/esm/src/animation/animation_styles.js +6 -0
  38. package/esm/src/animation/animation_styles.js.map +1 -0
  39. package/esm/src/animation/metadata.d.ts +511 -0
  40. package/esm/src/animation/metadata.js +565 -0
  41. package/esm/src/animation/metadata.js.map +1 -0
  42. package/esm/src/animation/metadata.metadata.json +1 -0
  43. package/esm/src/application_common_providers.d.ts +1 -0
  44. package/esm/src/application_common_providers.js +5 -4
  45. package/esm/src/application_common_providers.js.map +1 -1
  46. package/esm/src/application_common_providers.metadata.json +1 -1
  47. package/esm/src/application_ref.d.ts +17 -41
  48. package/esm/src/application_ref.js +32 -23
  49. package/esm/src/application_ref.js.map +1 -1
  50. package/esm/src/application_ref.metadata.json +1 -1
  51. package/esm/src/application_tokens.d.ts +6 -1
  52. package/esm/src/application_tokens.js +9 -4
  53. package/esm/src/application_tokens.js.map +1 -1
  54. package/esm/src/application_tokens.metadata.json +1 -1
  55. package/esm/src/change_detection/change_detection.d.ts +9 -8
  56. package/esm/src/change_detection/change_detection.js +7 -7
  57. package/esm/src/change_detection/change_detection.js.map +1 -1
  58. package/esm/src/change_detection/change_detection.metadata.json +1 -1
  59. package/esm/src/change_detection/change_detection_util.d.ts +3 -1
  60. package/esm/src/change_detection/change_detection_util.js +6 -5
  61. package/esm/src/change_detection/change_detection_util.js.map +1 -1
  62. package/esm/src/change_detection/change_detection_util.metadata.json +1 -1
  63. package/esm/src/change_detection/change_detector_ref.d.ts +3 -0
  64. package/esm/src/change_detection/change_detector_ref.js +3 -0
  65. package/esm/src/change_detection/change_detector_ref.js.map +1 -1
  66. package/esm/src/change_detection/constants.d.ts +1 -0
  67. package/esm/src/change_detection/constants.js +4 -3
  68. package/esm/src/change_detection/constants.js.map +1 -1
  69. package/esm/src/change_detection/constants.metadata.json +1 -1
  70. package/esm/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
  71. package/esm/src/change_detection/differs/default_iterable_differ.js +25 -18
  72. package/esm/src/change_detection/differs/default_iterable_differ.js.map +1 -1
  73. package/esm/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
  74. package/esm/src/change_detection/differs/default_keyvalue_differ.js +13 -8
  75. package/esm/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
  76. package/esm/src/change_detection/differs/iterable_differs.d.ts +4 -1
  77. package/esm/src/change_detection/differs/iterable_differs.js +5 -4
  78. package/esm/src/change_detection/differs/iterable_differs.js.map +1 -1
  79. package/esm/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
  80. package/esm/src/change_detection/differs/keyvalue_differs.js +5 -4
  81. package/esm/src/change_detection/differs/keyvalue_differs.js.map +1 -1
  82. package/esm/src/change_detection/pipe_transform.js.map +1 -1
  83. package/esm/src/change_detection.d.ts +1 -1
  84. package/esm/src/change_detection.js +5 -5
  85. package/esm/src/change_detection.js.map +1 -1
  86. package/esm/src/console.js +2 -1
  87. package/esm/src/console.js.map +1 -1
  88. package/esm/src/console.metadata.json +1 -1
  89. package/esm/src/debug/debug_node.d.ts +20 -2
  90. package/esm/src/debug/debug_node.js +16 -2
  91. package/esm/src/debug/debug_node.js.map +1 -1
  92. package/esm/src/debug/debug_node.metadata.json +1 -0
  93. package/esm/src/debug/debug_renderer.d.ts +10 -6
  94. package/esm/src/debug/debug_renderer.js +13 -2
  95. package/esm/src/debug/debug_renderer.js.map +1 -1
  96. package/esm/src/di/decorators.d.ts +13 -1
  97. package/esm/src/di/decorators.js +7 -1
  98. package/esm/src/di/decorators.js.map +1 -1
  99. package/esm/src/di/decorators.metadata.json +1 -1
  100. package/esm/src/di/forward_ref.d.ts +3 -1
  101. package/esm/src/di/forward_ref.js +3 -1
  102. package/esm/src/di/forward_ref.js.map +1 -1
  103. package/esm/src/di/injector.d.ts +4 -1
  104. package/esm/src/di/injector.js +5 -2
  105. package/esm/src/di/injector.js.map +1 -1
  106. package/esm/src/di/injector.metadata.json +1 -1
  107. package/esm/src/di/metadata.d.ts +8 -1
  108. package/esm/src/di/metadata.js +10 -3
  109. package/esm/src/di/metadata.js.map +1 -1
  110. package/esm/src/di/opaque_token.d.ts +2 -1
  111. package/esm/src/di/opaque_token.js +22 -21
  112. package/esm/src/di/opaque_token.js.map +1 -1
  113. package/esm/src/di/provider.d.ts +11 -10
  114. package/esm/src/di/provider.js +17 -14
  115. package/esm/src/di/provider.js.map +1 -1
  116. package/esm/src/di/provider.metadata.json +1 -0
  117. package/esm/src/di/provider_util.js.map +1 -1
  118. package/esm/src/di/provider_util.metadata.json +1 -0
  119. package/esm/src/di/reflective_exceptions.d.ts +11 -16
  120. package/esm/src/di/reflective_exceptions.js +28 -22
  121. package/esm/src/di/reflective_exceptions.js.map +1 -1
  122. package/esm/src/di/reflective_injector.d.ts +3 -33
  123. package/esm/src/di/reflective_injector.js +10 -7
  124. package/esm/src/di/reflective_injector.js.map +1 -1
  125. package/esm/src/di/reflective_key.d.ts +1 -8
  126. package/esm/src/di/reflective_key.js +3 -2
  127. package/esm/src/di/reflective_key.js.map +1 -1
  128. package/esm/src/di/reflective_provider.d.ts +2 -1
  129. package/esm/src/di/reflective_provider.js +6 -5
  130. package/esm/src/di/reflective_provider.js.map +1 -1
  131. package/esm/src/di/reflective_provider.metadata.json +1 -0
  132. package/esm/src/di.d.ts +2 -2
  133. package/esm/src/di.js +6 -6
  134. package/esm/src/di.js.map +1 -1
  135. package/esm/src/facade/async.d.ts +11 -4
  136. package/esm/src/facade/async.js +25 -15
  137. package/esm/src/facade/async.js.map +1 -1
  138. package/esm/src/facade/base_wrapped_exception.js +4 -4
  139. package/esm/src/facade/base_wrapped_exception.js.map +1 -1
  140. package/esm/src/facade/collection.js +1 -1
  141. package/esm/src/facade/collection.js.map +1 -1
  142. package/esm/src/facade/collection.metadata.json +1 -1
  143. package/esm/src/facade/exception_handler.d.ts +2 -11
  144. package/esm/src/facade/exception_handler.js +8 -7
  145. package/esm/src/facade/exception_handler.js.map +1 -1
  146. package/esm/src/facade/exceptions.d.ts +4 -0
  147. package/esm/src/facade/exceptions.js +6 -2
  148. package/esm/src/facade/exceptions.js.map +1 -1
  149. package/esm/src/facade/exceptions.metadata.json +1 -0
  150. package/esm/src/facade/lang.d.ts +6 -4
  151. package/esm/src/facade/lang.js +12 -11
  152. package/esm/src/facade/lang.js.map +1 -1
  153. package/esm/src/facade/lang.metadata.json +1 -1
  154. package/esm/src/facade/math.d.ts +2 -0
  155. package/esm/src/facade/math.js +4 -0
  156. package/esm/src/facade/math.js.map +1 -0
  157. package/esm/src/facade/math.metadata.json +1 -0
  158. package/esm/src/facade/promise.js.map +1 -1
  159. package/esm/src/linker/component_factory.d.ts +5 -4
  160. package/esm/src/linker/component_factory.js +7 -3
  161. package/esm/src/linker/component_factory.js.map +1 -1
  162. package/esm/src/linker/component_resolver.d.ts +5 -4
  163. package/esm/src/linker/component_resolver.js +12 -7
  164. package/esm/src/linker/component_resolver.js.map +1 -1
  165. package/esm/src/linker/component_resolver.metadata.json +1 -1
  166. package/esm/src/linker/debug_context.js +5 -4
  167. package/esm/src/linker/debug_context.js.map +1 -1
  168. package/esm/src/linker/dynamic_component_loader.d.ts +5 -6
  169. package/esm/src/linker/dynamic_component_loader.js +5 -3
  170. package/esm/src/linker/dynamic_component_loader.js.map +1 -1
  171. package/esm/src/linker/dynamic_component_loader.metadata.json +1 -1
  172. package/esm/src/linker/element.d.ts +3 -3
  173. package/esm/src/linker/element.js +5 -5
  174. package/esm/src/linker/element.js.map +1 -1
  175. package/esm/src/linker/element_injector.js.map +1 -1
  176. package/esm/src/linker/element_ref.d.ts +1 -0
  177. package/esm/src/linker/element_ref.js +5 -5
  178. package/esm/src/linker/element_ref.js.map +1 -1
  179. package/esm/src/linker/exceptions.d.ts +4 -1
  180. package/esm/src/linker/exceptions.js +4 -1
  181. package/esm/src/linker/exceptions.js.map +1 -1
  182. package/esm/src/linker/query_list.d.ts +3 -10
  183. package/esm/src/linker/query_list.js +8 -7
  184. package/esm/src/linker/query_list.js.map +1 -1
  185. package/esm/src/linker/systemjs_component_resolver.d.ts +21 -0
  186. package/esm/src/linker/systemjs_component_resolver.js +44 -0
  187. package/esm/src/linker/systemjs_component_resolver.js.map +1 -0
  188. package/esm/src/linker/template_ref.d.ts +2 -1
  189. package/esm/src/linker/template_ref.js +1 -0
  190. package/esm/src/linker/template_ref.js.map +1 -1
  191. package/esm/src/linker/view.d.ts +12 -1
  192. package/esm/src/linker/view.js +62 -16
  193. package/esm/src/linker/view.js.map +1 -1
  194. package/esm/src/linker/view_container_ref.d.ts +2 -10
  195. package/esm/src/linker/view_container_ref.js +4 -3
  196. package/esm/src/linker/view_container_ref.js.map +1 -1
  197. package/esm/src/linker/view_ref.d.ts +5 -1
  198. package/esm/src/linker/view_ref.js +6 -2
  199. package/esm/src/linker/view_ref.js.map +1 -1
  200. package/esm/src/linker/view_type.js.map +1 -1
  201. package/esm/src/linker/view_utils.d.ts +2 -4
  202. package/esm/src/linker/view_utils.js +21 -21
  203. package/esm/src/linker/view_utils.js.map +1 -1
  204. package/esm/src/linker/view_utils.metadata.json +1 -1
  205. package/esm/src/linker.d.ts +5 -4
  206. package/esm/src/linker.js +5 -4
  207. package/esm/src/linker.js.map +1 -1
  208. package/esm/src/metadata/di.d.ts +8 -1
  209. package/esm/src/metadata/di.js +10 -3
  210. package/esm/src/metadata/di.js.map +1 -1
  211. package/esm/src/metadata/directives.d.ts +104 -20
  212. package/esm/src/metadata/directives.js +25 -19
  213. package/esm/src/metadata/directives.js.map +1 -1
  214. package/esm/src/metadata/lifecycle_hooks.d.ts +46 -31
  215. package/esm/src/metadata/lifecycle_hooks.js +464 -10
  216. package/esm/src/metadata/lifecycle_hooks.js.map +1 -1
  217. package/esm/src/metadata/lifecycle_hooks.metadata.json +1 -1
  218. package/esm/src/metadata/view.d.ts +6 -2
  219. package/esm/src/metadata/view.js +3 -1
  220. package/esm/src/metadata/view.js.map +1 -1
  221. package/esm/src/metadata/view.metadata.json +1 -1
  222. package/esm/src/metadata.d.ts +49 -15
  223. package/esm/src/metadata.js +35 -10
  224. package/esm/src/metadata.js.map +1 -1
  225. package/esm/src/metadata.metadata.json +1 -1
  226. package/esm/src/platform_common_providers.d.ts +1 -0
  227. package/esm/src/platform_common_providers.js +3 -3
  228. package/esm/src/platform_common_providers.js.map +1 -1
  229. package/esm/src/platform_common_providers.metadata.json +1 -1
  230. package/esm/src/platform_directives_and_pipes.d.ts +48 -45
  231. package/esm/src/platform_directives_and_pipes.js +50 -47
  232. package/esm/src/platform_directives_and_pipes.js.map +1 -1
  233. package/esm/src/platform_directives_and_pipes.metadata.json +1 -1
  234. package/esm/src/profile/profile.d.ts +5 -1
  235. package/esm/src/profile/profile.js +4 -0
  236. package/esm/src/profile/profile.js.map +1 -1
  237. package/esm/src/profile/profile.metadata.json +1 -1
  238. package/esm/src/profile/wtf_impl.js +1 -1
  239. package/esm/src/profile/wtf_impl.js.map +1 -1
  240. package/esm/src/profile/wtf_impl.metadata.json +1 -0
  241. package/esm/src/profile/wtf_init.js +2 -2
  242. package/esm/src/profile/wtf_init.js.map +1 -1
  243. package/esm/src/reflection/platform_reflection_capabilities.d.ts +4 -3
  244. package/esm/src/reflection/platform_reflection_capabilities.js.map +1 -1
  245. package/esm/src/reflection/reflection.d.ts +1 -1
  246. package/esm/src/reflection/reflection.js +2 -2
  247. package/esm/src/reflection/reflection.js.map +1 -1
  248. package/esm/src/reflection/reflection.metadata.json +1 -1
  249. package/esm/src/reflection/reflection_capabilities.d.ts +4 -5
  250. package/esm/src/reflection/reflection_capabilities.js +22 -10
  251. package/esm/src/reflection/reflection_capabilities.js.map +1 -1
  252. package/esm/src/reflection/reflector.d.ts +8 -20
  253. package/esm/src/reflection/reflector.js +13 -3
  254. package/esm/src/reflection/reflector.js.map +1 -1
  255. package/esm/src/reflection/reflector_reader.js +3 -3
  256. package/esm/src/reflection/reflector_reader.js.map +1 -1
  257. package/esm/src/reflection/types.js.map +1 -1
  258. package/esm/src/render/api.d.ts +17 -6
  259. package/esm/src/render/api.js +8 -1
  260. package/esm/src/render/api.js.map +1 -1
  261. package/esm/src/render.d.ts +1 -1
  262. package/esm/src/render.js +1 -1
  263. package/esm/src/render.js.map +1 -1
  264. package/esm/src/security.js +6 -6
  265. package/esm/src/security.js.map +1 -1
  266. package/esm/src/testability/testability.d.ts +3 -19
  267. package/esm/src/testability/testability.js +10 -5
  268. package/esm/src/testability/testability.js.map +1 -1
  269. package/esm/src/testability/testability.metadata.json +1 -1
  270. package/esm/src/util/decorators.d.ts +2 -1
  271. package/esm/src/util/decorators.js +10 -9
  272. package/esm/src/util/decorators.js.map +1 -1
  273. package/esm/src/util.js.map +1 -1
  274. package/esm/src/zone/ng_zone.d.ts +6 -17
  275. package/esm/src/zone/ng_zone.js +7 -6
  276. package/esm/src/zone/ng_zone.js.map +1 -1
  277. package/esm/src/zone/ng_zone_impl.d.ts +1 -4
  278. package/esm/src/zone/ng_zone_impl.js +3 -2
  279. package/esm/src/zone/ng_zone_impl.js.map +1 -1
  280. package/esm/src/zone.js.map +1 -1
  281. package/esm/testing/async.js +20 -22
  282. package/esm/testing/async.js.map +1 -1
  283. package/esm/testing/async.metadata.json +1 -0
  284. package/esm/testing/async_test_completer.js.map +1 -1
  285. package/esm/testing/fake_async.d.ts +4 -1
  286. package/esm/testing/fake_async.js +9 -2
  287. package/esm/testing/fake_async.js.map +1 -1
  288. package/esm/testing/lang_utils.js +1 -1
  289. package/esm/testing/lang_utils.js.map +1 -1
  290. package/esm/testing/lang_utils.metadata.json +1 -0
  291. package/esm/testing/logger.js +5 -3
  292. package/esm/testing/logger.js.map +1 -1
  293. package/esm/testing/logger.metadata.json +1 -1
  294. package/esm/testing/mock_application_ref.d.ts +1 -1
  295. package/esm/testing/mock_application_ref.js +1 -0
  296. package/esm/testing/mock_application_ref.js.map +1 -1
  297. package/esm/testing/mock_application_ref.metadata.json +1 -1
  298. package/esm/testing/ng_zone_mock.d.ts +0 -1
  299. package/esm/testing/ng_zone_mock.js +2 -1
  300. package/esm/testing/ng_zone_mock.js.map +1 -1
  301. package/esm/testing/ng_zone_mock.metadata.json +1 -1
  302. package/esm/testing/regexp.js +1 -1
  303. package/esm/testing/regexp.js.map +1 -1
  304. package/esm/testing/regexp.metadata.json +1 -0
  305. package/esm/testing/test_injector.d.ts +6 -12
  306. package/esm/testing/test_injector.js +4 -10
  307. package/esm/testing/test_injector.js.map +1 -1
  308. package/esm/testing/test_injector.metadata.json +1 -0
  309. package/esm/testing/testing.d.ts +2 -2
  310. package/esm/testing/testing.js +2 -2
  311. package/esm/testing/testing.js.map +1 -1
  312. package/esm/testing/testing.metadata.json +1 -1
  313. package/esm/testing.js.map +1 -1
  314. package/index.d.ts +5 -4
  315. package/index.js +10 -8
  316. package/index.js.map +1 -1
  317. package/package.json +5 -1
  318. package/private_export.d.ts +96 -11
  319. package/private_export.js +39 -10
  320. package/private_export.js.map +1 -1
  321. package/private_export.metadata.json +1 -1
  322. package/src/animation/active_animation_players_map.d.ts +11 -0
  323. package/src/animation/active_animation_players_map.js +54 -0
  324. package/src/animation/active_animation_players_map.js.map +1 -0
  325. package/src/animation/animation_constants.d.ts +4 -0
  326. package/src/animation/animation_constants.js +6 -0
  327. package/src/animation/animation_constants.js.map +1 -0
  328. package/src/animation/animation_constants.metadata.json +1 -0
  329. package/src/animation/animation_driver.d.ts +9 -0
  330. package/src/animation/animation_driver.js +25 -0
  331. package/src/animation/animation_driver.js.map +1 -0
  332. package/src/animation/animation_group_player.d.ts +18 -0
  333. package/src/animation/animation_group_player.js +64 -0
  334. package/src/animation/animation_group_player.js.map +1 -0
  335. package/src/animation/animation_keyframe.d.ts +6 -0
  336. package/src/animation/animation_keyframe.js +10 -0
  337. package/src/animation/animation_keyframe.js.map +1 -0
  338. package/src/animation/animation_player.d.ts +26 -0
  339. package/src/animation/animation_player.js +42 -0
  340. package/src/animation/animation_player.js.map +1 -0
  341. package/src/animation/animation_sequence_player.d.ts +21 -0
  342. package/src/animation/animation_sequence_player.js +69 -0
  343. package/src/animation/animation_sequence_player.js.map +1 -0
  344. package/src/animation/animation_style_util.d.ts +32 -0
  345. package/src/animation/animation_style_util.js +99 -0
  346. package/src/animation/animation_style_util.js.map +1 -0
  347. package/src/animation/animation_style_util.metadata.json +1 -0
  348. package/src/animation/animation_styles.d.ts +8 -0
  349. package/src/animation/animation_styles.js +9 -0
  350. package/src/animation/animation_styles.js.map +1 -0
  351. package/src/animation/metadata.d.ts +511 -0
  352. package/src/animation/metadata.js +627 -0
  353. package/src/animation/metadata.js.map +1 -0
  354. package/src/animation/metadata.metadata.json +1 -0
  355. package/src/application_common_providers.d.ts +1 -0
  356. package/src/application_common_providers.js +4 -3
  357. package/src/application_common_providers.js.map +1 -1
  358. package/src/application_common_providers.metadata.json +1 -1
  359. package/src/application_ref.d.ts +17 -41
  360. package/src/application_ref.js +30 -21
  361. package/src/application_ref.js.map +1 -1
  362. package/src/application_ref.metadata.json +1 -1
  363. package/src/application_tokens.d.ts +6 -1
  364. package/src/application_tokens.js +9 -4
  365. package/src/application_tokens.js.map +1 -1
  366. package/src/application_tokens.metadata.json +1 -1
  367. package/src/change_detection/change_detection.d.ts +9 -8
  368. package/src/change_detection/change_detection.js +21 -21
  369. package/src/change_detection/change_detection.js.map +1 -1
  370. package/src/change_detection/change_detection.metadata.json +1 -1
  371. package/src/change_detection/change_detection_util.d.ts +3 -1
  372. package/src/change_detection/change_detection_util.js +6 -5
  373. package/src/change_detection/change_detection_util.js.map +1 -1
  374. package/src/change_detection/change_detection_util.metadata.json +1 -1
  375. package/src/change_detection/change_detector_ref.d.ts +3 -0
  376. package/src/change_detection/change_detector_ref.js +3 -0
  377. package/src/change_detection/change_detector_ref.js.map +1 -1
  378. package/src/change_detection/constants.d.ts +1 -0
  379. package/src/change_detection/constants.js +4 -3
  380. package/src/change_detection/constants.js.map +1 -1
  381. package/src/change_detection/constants.metadata.json +1 -1
  382. package/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
  383. package/src/change_detection/differs/default_iterable_differ.js +25 -18
  384. package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
  385. package/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
  386. package/src/change_detection/differs/default_keyvalue_differ.js +13 -8
  387. package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
  388. package/src/change_detection/differs/iterable_differs.d.ts +4 -1
  389. package/src/change_detection/differs/iterable_differs.js +4 -3
  390. package/src/change_detection/differs/iterable_differs.js.map +1 -1
  391. package/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
  392. package/src/change_detection/differs/keyvalue_differs.js +4 -3
  393. package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
  394. package/src/change_detection/pipe_transform.js.map +1 -1
  395. package/src/change_detection.d.ts +1 -1
  396. package/src/change_detection.js +9 -9
  397. package/src/change_detection.js.map +1 -1
  398. package/src/console.js +2 -1
  399. package/src/console.js.map +1 -1
  400. package/src/console.metadata.json +1 -1
  401. package/src/debug/debug_node.d.ts +20 -2
  402. package/src/debug/debug_node.js +16 -2
  403. package/src/debug/debug_node.js.map +1 -1
  404. package/src/debug/debug_node.metadata.json +1 -0
  405. package/src/debug/debug_renderer.d.ts +10 -6
  406. package/src/debug/debug_renderer.js +12 -1
  407. package/src/debug/debug_renderer.js.map +1 -1
  408. package/src/di/decorators.d.ts +13 -1
  409. package/src/di/decorators.js +7 -1
  410. package/src/di/decorators.js.map +1 -1
  411. package/src/di/decorators.metadata.json +1 -1
  412. package/src/di/forward_ref.d.ts +3 -1
  413. package/src/di/forward_ref.js +3 -1
  414. package/src/di/forward_ref.js.map +1 -1
  415. package/src/di/injector.d.ts +4 -1
  416. package/src/di/injector.js +5 -2
  417. package/src/di/injector.js.map +1 -1
  418. package/src/di/injector.metadata.json +1 -1
  419. package/src/di/metadata.d.ts +8 -1
  420. package/src/di/metadata.js +10 -3
  421. package/src/di/metadata.js.map +1 -1
  422. package/src/di/opaque_token.d.ts +2 -1
  423. package/src/di/opaque_token.js +22 -21
  424. package/src/di/opaque_token.js.map +1 -1
  425. package/src/di/provider.d.ts +11 -10
  426. package/src/di/provider.js +17 -14
  427. package/src/di/provider.js.map +1 -1
  428. package/src/di/provider.metadata.json +1 -0
  429. package/src/di/provider_util.js.map +1 -1
  430. package/src/di/provider_util.metadata.json +1 -0
  431. package/src/di/reflective_exceptions.d.ts +11 -16
  432. package/src/di/reflective_exceptions.js +28 -22
  433. package/src/di/reflective_exceptions.js.map +1 -1
  434. package/src/di/reflective_injector.d.ts +3 -33
  435. package/src/di/reflective_injector.js +9 -6
  436. package/src/di/reflective_injector.js.map +1 -1
  437. package/src/di/reflective_key.d.ts +1 -8
  438. package/src/di/reflective_key.js +3 -2
  439. package/src/di/reflective_key.js.map +1 -1
  440. package/src/di/reflective_provider.d.ts +2 -1
  441. package/src/di/reflective_provider.js +6 -5
  442. package/src/di/reflective_provider.js.map +1 -1
  443. package/src/di/reflective_provider.metadata.json +1 -0
  444. package/src/di.d.ts +2 -2
  445. package/src/di.js +7 -9
  446. package/src/di.js.map +1 -1
  447. package/src/facade/async.d.ts +11 -4
  448. package/src/facade/async.js +27 -17
  449. package/src/facade/async.js.map +1 -1
  450. package/src/facade/base_wrapped_exception.js +4 -4
  451. package/src/facade/base_wrapped_exception.js.map +1 -1
  452. package/src/facade/collection.js.map +1 -1
  453. package/src/facade/collection.metadata.json +1 -1
  454. package/src/facade/exception_handler.d.ts +2 -11
  455. package/src/facade/exception_handler.js +8 -7
  456. package/src/facade/exception_handler.js.map +1 -1
  457. package/src/facade/exceptions.d.ts +4 -0
  458. package/src/facade/exceptions.js +6 -2
  459. package/src/facade/exceptions.js.map +1 -1
  460. package/src/facade/exceptions.metadata.json +1 -0
  461. package/src/facade/lang.d.ts +6 -4
  462. package/src/facade/lang.js +12 -11
  463. package/src/facade/lang.js.map +1 -1
  464. package/src/facade/lang.metadata.json +1 -1
  465. package/src/facade/math.d.ts +2 -0
  466. package/src/facade/math.js +5 -0
  467. package/src/facade/math.js.map +1 -0
  468. package/src/facade/math.metadata.json +1 -0
  469. package/src/facade/promise.js.map +1 -1
  470. package/src/linker/component_factory.d.ts +5 -4
  471. package/src/linker/component_factory.js +7 -3
  472. package/src/linker/component_factory.js.map +1 -1
  473. package/src/linker/component_resolver.d.ts +5 -4
  474. package/src/linker/component_resolver.js +12 -7
  475. package/src/linker/component_resolver.js.map +1 -1
  476. package/src/linker/component_resolver.metadata.json +1 -1
  477. package/src/linker/debug_context.js +5 -4
  478. package/src/linker/debug_context.js.map +1 -1
  479. package/src/linker/dynamic_component_loader.d.ts +5 -6
  480. package/src/linker/dynamic_component_loader.js +5 -3
  481. package/src/linker/dynamic_component_loader.js.map +1 -1
  482. package/src/linker/dynamic_component_loader.metadata.json +1 -1
  483. package/src/linker/element.d.ts +3 -3
  484. package/src/linker/element.js +5 -5
  485. package/src/linker/element.js.map +1 -1
  486. package/src/linker/element_injector.js.map +1 -1
  487. package/src/linker/element_ref.d.ts +1 -0
  488. package/src/linker/element_ref.js +5 -5
  489. package/src/linker/element_ref.js.map +1 -1
  490. package/src/linker/exceptions.d.ts +4 -1
  491. package/src/linker/exceptions.js +4 -1
  492. package/src/linker/exceptions.js.map +1 -1
  493. package/src/linker/query_list.d.ts +3 -10
  494. package/src/linker/query_list.js +8 -7
  495. package/src/linker/query_list.js.map +1 -1
  496. package/src/linker/systemjs_component_resolver.d.ts +21 -0
  497. package/src/linker/systemjs_component_resolver.js +52 -0
  498. package/src/linker/systemjs_component_resolver.js.map +1 -0
  499. package/src/linker/template_ref.d.ts +2 -1
  500. package/src/linker/template_ref.js +1 -0
  501. package/src/linker/template_ref.js.map +1 -1
  502. package/src/linker/view.d.ts +12 -1
  503. package/src/linker/view.js +65 -15
  504. package/src/linker/view.js.map +1 -1
  505. package/src/linker/view_container_ref.d.ts +2 -10
  506. package/src/linker/view_container_ref.js +4 -3
  507. package/src/linker/view_container_ref.js.map +1 -1
  508. package/src/linker/view_ref.d.ts +5 -1
  509. package/src/linker/view_ref.js +6 -2
  510. package/src/linker/view_ref.js.map +1 -1
  511. package/src/linker/view_type.js.map +1 -1
  512. package/src/linker/view_utils.d.ts +2 -4
  513. package/src/linker/view_utils.js +21 -21
  514. package/src/linker/view_utils.js.map +1 -1
  515. package/src/linker/view_utils.metadata.json +1 -1
  516. package/src/linker.d.ts +5 -4
  517. package/src/linker.js +12 -9
  518. package/src/linker.js.map +1 -1
  519. package/src/metadata/di.d.ts +8 -1
  520. package/src/metadata/di.js +10 -3
  521. package/src/metadata/di.js.map +1 -1
  522. package/src/metadata/directives.d.ts +104 -20
  523. package/src/metadata/directives.js +25 -27
  524. package/src/metadata/directives.js.map +1 -1
  525. package/src/metadata/lifecycle_hooks.d.ts +46 -31
  526. package/src/metadata/lifecycle_hooks.js +496 -10
  527. package/src/metadata/lifecycle_hooks.js.map +1 -1
  528. package/src/metadata/lifecycle_hooks.metadata.json +1 -1
  529. package/src/metadata/view.d.ts +6 -2
  530. package/src/metadata/view.js +3 -1
  531. package/src/metadata/view.js.map +1 -1
  532. package/src/metadata/view.metadata.json +1 -1
  533. package/src/metadata.d.ts +49 -15
  534. package/src/metadata.js +70 -37
  535. package/src/metadata.js.map +1 -1
  536. package/src/metadata.metadata.json +1 -1
  537. package/src/platform_common_providers.d.ts +1 -0
  538. package/src/platform_common_providers.js +3 -3
  539. package/src/platform_common_providers.js.map +1 -1
  540. package/src/platform_common_providers.metadata.json +1 -1
  541. package/src/platform_directives_and_pipes.d.ts +48 -45
  542. package/src/platform_directives_and_pipes.js +50 -47
  543. package/src/platform_directives_and_pipes.js.map +1 -1
  544. package/src/platform_directives_and_pipes.metadata.json +1 -1
  545. package/src/profile/profile.d.ts +5 -1
  546. package/src/profile/profile.js +5 -3
  547. package/src/profile/profile.js.map +1 -1
  548. package/src/profile/profile.metadata.json +1 -1
  549. package/src/profile/wtf_impl.js +1 -1
  550. package/src/profile/wtf_impl.js.map +1 -1
  551. package/src/profile/wtf_impl.metadata.json +1 -0
  552. package/src/profile/wtf_init.js +2 -2
  553. package/src/profile/wtf_init.js.map +1 -1
  554. package/src/reflection/platform_reflection_capabilities.d.ts +4 -3
  555. package/src/reflection/platform_reflection_capabilities.js.map +1 -1
  556. package/src/reflection/reflection.d.ts +1 -1
  557. package/src/reflection/reflection.js +2 -2
  558. package/src/reflection/reflection.js.map +1 -1
  559. package/src/reflection/reflection.metadata.json +1 -1
  560. package/src/reflection/reflection_capabilities.d.ts +4 -5
  561. package/src/reflection/reflection_capabilities.js +24 -10
  562. package/src/reflection/reflection_capabilities.js.map +1 -1
  563. package/src/reflection/reflector.d.ts +8 -20
  564. package/src/reflection/reflector.js +13 -3
  565. package/src/reflection/reflector.js.map +1 -1
  566. package/src/reflection/reflector_reader.js +3 -3
  567. package/src/reflection/reflector_reader.js.map +1 -1
  568. package/src/reflection/types.js.map +1 -1
  569. package/src/render/api.d.ts +17 -6
  570. package/src/render/api.js +8 -1
  571. package/src/render/api.js.map +1 -1
  572. package/src/render.d.ts +1 -1
  573. package/src/render.js +2 -2
  574. package/src/render.js.map +1 -1
  575. package/src/security.js +6 -6
  576. package/src/security.js.map +1 -1
  577. package/src/testability/testability.d.ts +3 -19
  578. package/src/testability/testability.js +10 -5
  579. package/src/testability/testability.js.map +1 -1
  580. package/src/testability/testability.metadata.json +1 -1
  581. package/src/util/decorators.d.ts +2 -1
  582. package/src/util/decorators.js +10 -9
  583. package/src/util/decorators.js.map +1 -1
  584. package/src/util.js.map +1 -1
  585. package/src/zone/ng_zone.d.ts +6 -17
  586. package/src/zone/ng_zone.js +11 -6
  587. package/src/zone/ng_zone.js.map +1 -1
  588. package/src/zone/ng_zone_impl.d.ts +1 -4
  589. package/src/zone/ng_zone_impl.js +3 -2
  590. package/src/zone/ng_zone_impl.js.map +1 -1
  591. package/src/zone.js.map +1 -1
  592. package/testing/async.js +20 -22
  593. package/testing/async.js.map +1 -1
  594. package/testing/async.metadata.json +1 -0
  595. package/testing/async_test_completer.js.map +1 -1
  596. package/testing/fake_async.d.ts +4 -1
  597. package/testing/fake_async.js +10 -2
  598. package/testing/fake_async.js.map +1 -1
  599. package/testing/lang_utils.js +1 -1
  600. package/testing/lang_utils.js.map +1 -1
  601. package/testing/lang_utils.metadata.json +1 -0
  602. package/testing/logger.js +5 -3
  603. package/testing/logger.js.map +1 -1
  604. package/testing/logger.metadata.json +1 -1
  605. package/testing/mock_application_ref.d.ts +1 -1
  606. package/testing/mock_application_ref.js +1 -0
  607. package/testing/mock_application_ref.js.map +1 -1
  608. package/testing/mock_application_ref.metadata.json +1 -1
  609. package/testing/ng_zone_mock.d.ts +0 -1
  610. package/testing/ng_zone_mock.js +2 -1
  611. package/testing/ng_zone_mock.js.map +1 -1
  612. package/testing/ng_zone_mock.metadata.json +1 -1
  613. package/testing/regexp.js +1 -1
  614. package/testing/regexp.js.map +1 -1
  615. package/testing/regexp.metadata.json +1 -0
  616. package/testing/test_injector.d.ts +6 -12
  617. package/testing/test_injector.js +3 -9
  618. package/testing/test_injector.js.map +1 -1
  619. package/testing/test_injector.metadata.json +1 -0
  620. package/testing/testing.d.ts +2 -2
  621. package/testing/testing.js +5 -5
  622. package/testing/testing.js.map +1 -1
  623. package/testing/testing.metadata.json +1 -1
  624. package/testing.js.map +1 -1
@@ -1,7 +1,8 @@
1
- import { Type } from '../../src/facade/lang';
1
+ import { AnimationEntryMetadata } from '../animation/metadata';
2
+ import { ChangeDetectionStrategy } from '../change_detection/constants';
2
3
  import { InjectableMetadata } from '../di/metadata';
4
+ import { Type } from '../facade/lang';
3
5
  import { ViewEncapsulation } from './view';
4
- import { ChangeDetectionStrategy } from '../change_detection/constants';
5
6
  /**
6
7
  * Directives allow you to attach behavior to elements in the DOM.
7
8
  *
@@ -380,6 +381,7 @@ import { ChangeDetectionStrategy } from '../change_detection/constants';
380
381
  * the instantiated
381
382
  * view occurs on the second `<li></li>` which is a sibling to the `<template>` element.
382
383
  * @ts2dart_const
384
+ * @stable
383
385
  */
384
386
  export declare class DirectiveMetadata extends InjectableMetadata {
385
387
  /**
@@ -463,6 +465,11 @@ export declare class DirectiveMetadata extends InjectableMetadata {
463
465
  *
464
466
  */
465
467
  readonly inputs: string[];
468
+ /**
469
+ * Use `inputs` instead
470
+ *
471
+ * @deprecated
472
+ */
466
473
  readonly properties: string[];
467
474
  private _inputs;
468
475
  private _properties;
@@ -512,6 +519,11 @@ export declare class DirectiveMetadata extends InjectableMetadata {
512
519
  *
513
520
  */
514
521
  readonly outputs: string[];
522
+ /**
523
+ * Use `outputs` instead
524
+ *
525
+ * @deprecated
526
+ */
515
527
  readonly events: string[];
516
528
  private _outputs;
517
529
  private _events;
@@ -641,7 +653,7 @@ export declare class DirectiveMetadata extends InjectableMetadata {
641
653
  *
642
654
  * @Directive({
643
655
  * selector: 'greet',
644
- * bindings: [
656
+ * providers: [
645
657
  * Greeter
646
658
  * ]
647
659
  * })
@@ -655,10 +667,7 @@ export declare class DirectiveMetadata extends InjectableMetadata {
655
667
  * ```
656
668
  */
657
669
  readonly providers: any[];
658
- /** @deprecated */
659
- readonly bindings: any[];
660
670
  private _providers;
661
- private _bindings;
662
671
  /**
663
672
  * Defines the name that can be used in the template to assign this directive to a variable.
664
673
  *
@@ -718,17 +727,16 @@ export declare class DirectiveMetadata extends InjectableMetadata {
718
727
  queries: {
719
728
  [key: string]: any;
720
729
  };
721
- constructor({selector, inputs, outputs, properties, events, host, bindings, providers, exportAs, queries}?: {
730
+ constructor({selector, inputs, outputs, properties, events, host, providers, exportAs, queries}?: {
722
731
  selector?: string;
723
732
  inputs?: string[];
724
733
  outputs?: string[];
725
- properties?: string[];
726
- events?: string[];
734
+ /** @deprecated */ properties?: string[];
735
+ /** @deprecated */ events?: string[];
727
736
  host?: {
728
737
  [key: string]: string;
729
738
  };
730
739
  providers?: any[];
731
- /** @deprecated */ bindings?: any[];
732
740
  exportAs?: string;
733
741
  queries?: {
734
742
  [key: string]: any;
@@ -761,6 +769,7 @@ export declare class DirectiveMetadata extends InjectableMetadata {
761
769
  *
762
770
  * {@example core/ts/metadata/metadata.ts region='component'}
763
771
  * @ts2dart_const
772
+ * @stable
764
773
  */
765
774
  export declare class ComponentMetadata extends DirectiveMetadata {
766
775
  /**
@@ -812,14 +821,15 @@ export declare class ComponentMetadata extends DirectiveMetadata {
812
821
  * ```
813
822
  */
814
823
  readonly viewProviders: any[];
815
- readonly viewBindings: any[];
816
824
  private _viewProviders;
817
- private _viewBindings;
818
825
  /**
819
826
  * The module id of the module that contains the component.
820
827
  * Needed to be able to resolve relative urls for templates and styles.
828
+ * In CommonJS, this can always be set to `module.id`, similarly SystemJS exposes `__moduleName`
829
+ * variable within each module.
830
+ *
821
831
  * In Dart, this can be determined automatically and does not need to be set.
822
- * In CommonJS, this can always be set to `module.id`.
832
+
823
833
  *
824
834
  * ## Simple Example
825
835
  *
@@ -838,23 +848,93 @@ export declare class ComponentMetadata extends DirectiveMetadata {
838
848
  template: string;
839
849
  styleUrls: string[];
840
850
  styles: string[];
851
+ /**
852
+ * Animations are defined on components via an animation-like DSL. This DSL approach to describing
853
+ * animations allows for a flexibility that both benefits developers and the framework.
854
+ *
855
+ * Animations work by listening on state changes that occur on an element within
856
+ * the template. When a state change occurs, Angular can then take advantage and animate the
857
+ * arc in between. This works similar to how CSS transitions work, however, by having a
858
+ * programmatic DSL, animations are not limited to environments that are DOM-specific.
859
+ * (Angular can also perform optimizations behind the scenes to make animations more performant.)
860
+ *
861
+ * For animations to be available for use, animation state changes are placed within
862
+ * {@link trigger animation triggers} which are housed inside of the `animations` annotation
863
+ * metadata. Within a trigger both {@link state state} and {@link transition transition} entries
864
+ * can be placed.
865
+ *
866
+ * ```typescript
867
+ * @Component({
868
+ * selector: 'animation-cmp',
869
+ * templateUrl: 'animation-cmp.html',
870
+ * animations: [
871
+ * // this here is our animation trigger that
872
+ * // will contain our state change animations.
873
+ * trigger('myTriggerName', [
874
+ * // the styles defined for the `on` and `off`
875
+ * // states declared below are persisted on the
876
+ * // element once the animation completes.
877
+ * state('on', style({ opacity: 1 }),
878
+ * state('off', style({ opacity: 0 }),
879
+ *
880
+ * // this here is our animation that kicks off when
881
+ * // this state change jump is true
882
+ * transition('on => off', [
883
+ * animate("1s")
884
+ * ])
885
+ * ])
886
+ * ]
887
+ * })
888
+ * ```
889
+ *
890
+ * As depicted in the code above, a group of related animation states are all contained within
891
+ * an animation `trigger` (the code example above called the trigger `myTriggerName`).
892
+ * When a trigger is created then it can be bound onto an element within the component's
893
+ * template via a property prefixed by an `@` symbol followed by trigger name and an expression
894
+ * that
895
+ * is used to determine the state value for that trigger.
896
+ *
897
+ * ```html
898
+ * <!-- animation-cmp.html -->
899
+ * <div @myTriggerName="expression">...</div>
900
+ * ```
901
+ *
902
+ * For state changes to be executed, the `expression` value must change value from its existing
903
+ * value
904
+ * to something that we have set an animation to animate on (in the example above we are listening
905
+ * to a change of state between `on` and `off`). The `expression` value attached to the trigger
906
+ * must be something that can be evaluated with the template/component context.
907
+ *
908
+ * ### DSL Animation Functions
909
+ *
910
+ * Please visit each of the animation DSL functions listed below to gain a better understanding
911
+ * of how and why they are used for crafting animations in Angular2:
912
+ *
913
+ * - {@link trigger trigger()}
914
+ * - {@link state state()}
915
+ * - {@link transition transition()}
916
+ * - {@link group group()}
917
+ * - {@link sequence sequence()}
918
+ * - {@link style style()}
919
+ * - {@link animate animate()}
920
+ * - {@link keyframes keyframes()}
921
+ */
922
+ animations: AnimationEntryMetadata[];
841
923
  directives: Array<Type | any[]>;
842
924
  pipes: Array<Type | any[]>;
843
925
  encapsulation: ViewEncapsulation;
844
- constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, bindings, providers, viewBindings, viewProviders, changeDetection, queries, templateUrl, template, styleUrls, styles, directives, pipes, encapsulation}?: {
926
+ constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, providers, viewProviders, changeDetection, queries, templateUrl, template, styleUrls, styles, animations, directives, pipes, encapsulation}?: {
845
927
  selector?: string;
846
928
  inputs?: string[];
847
929
  outputs?: string[];
848
- properties?: string[];
849
- events?: string[];
930
+ /** @deprecated */ properties?: string[];
931
+ /** @deprecated */ events?: string[];
850
932
  host?: {
851
933
  [key: string]: string;
852
934
  };
853
- /** @deprecated */ bindings?: any[];
854
935
  providers?: any[];
855
936
  exportAs?: string;
856
937
  moduleId?: string;
857
- /** @deprecated */ viewBindings?: any[];
858
938
  viewProviders?: any[];
859
939
  queries?: {
860
940
  [key: string]: any;
@@ -864,6 +944,7 @@ export declare class ComponentMetadata extends DirectiveMetadata {
864
944
  template?: string;
865
945
  styleUrls?: string[];
866
946
  styles?: string[];
947
+ animations?: AnimationEntryMetadata[];
867
948
  directives?: Array<Type | any[]>;
868
949
  pipes?: Array<Type | any[]>;
869
950
  encapsulation?: ViewEncapsulation;
@@ -880,11 +961,10 @@ export declare class ComponentMetadata extends DirectiveMetadata {
880
961
  *
881
962
  * {@example core/ts/metadata/metadata.ts region='pipe'}
882
963
  * @ts2dart_const
964
+ * @stable
883
965
  */
884
966
  export declare class PipeMetadata extends InjectableMetadata {
885
967
  name: string;
886
- /** @internal */
887
- _pure: boolean;
888
968
  constructor({name, pure}: {
889
969
  name: string;
890
970
  pure?: boolean;
@@ -932,6 +1012,7 @@ export declare class PipeMetadata extends InjectableMetadata {
932
1012
  * bootstrap(App);
933
1013
  * ```
934
1014
  * @ts2dart_const
1015
+ * @stable
935
1016
  */
936
1017
  export declare class InputMetadata {
937
1018
  /**
@@ -985,6 +1066,7 @@ export declare class InputMetadata {
985
1066
  * bootstrap(App);
986
1067
  * ```
987
1068
  * @ts2dart_const
1069
+ * @stable
988
1070
  */
989
1071
  export declare class OutputMetadata {
990
1072
  bindingPropertyName: string;
@@ -1025,6 +1107,7 @@ export declare class OutputMetadata {
1025
1107
  * bootstrap(App);
1026
1108
  * ```
1027
1109
  * @ts2dart_const
1110
+ * @stable
1028
1111
  */
1029
1112
  export declare class HostBindingMetadata {
1030
1113
  hostPropertyName: string;
@@ -1064,6 +1147,7 @@ export declare class HostBindingMetadata {
1064
1147
  * bootstrap(App);
1065
1148
  * ```
1066
1149
  * @ts2dart_const
1150
+ * @stable
1067
1151
  */
1068
1152
  export declare class HostListenerMetadata {
1069
1153
  eventName: string;
@@ -1,6 +1,6 @@
1
- import { isPresent } from '../../src/facade/lang';
2
- import { InjectableMetadata } from '../di/metadata';
3
1
  import { ChangeDetectionStrategy } from '../change_detection/constants';
2
+ import { InjectableMetadata } from '../di/metadata';
3
+ import { isPresent } from '../facade/lang';
4
4
  /**
5
5
  * Directives allow you to attach behavior to elements in the DOM.
6
6
  *
@@ -379,9 +379,10 @@ import { ChangeDetectionStrategy } from '../change_detection/constants';
379
379
  * the instantiated
380
380
  * view occurs on the second `<li></li>` which is a sibling to the `<template>` element.
381
381
  * @ts2dart_const
382
+ * @stable
382
383
  */
383
384
  export class DirectiveMetadata extends InjectableMetadata {
384
- constructor({ selector, inputs, outputs, properties, events, host, bindings, providers, exportAs, queries } = {}) {
385
+ constructor({ selector, inputs, outputs, properties, events, host, providers, exportAs, queries } = {}) {
385
386
  super();
386
387
  this.selector = selector;
387
388
  this._inputs = inputs;
@@ -392,7 +393,6 @@ export class DirectiveMetadata extends InjectableMetadata {
392
393
  this.exportAs = exportAs;
393
394
  this.queries = queries;
394
395
  this._providers = providers;
395
- this._bindings = bindings;
396
396
  }
397
397
  /**
398
398
  * Enumerates the set of data-bound input properties for a directive
@@ -445,6 +445,11 @@ export class DirectiveMetadata extends InjectableMetadata {
445
445
  return isPresent(this._properties) && this._properties.length > 0 ? this._properties :
446
446
  this._inputs;
447
447
  }
448
+ /**
449
+ * Use `inputs` instead
450
+ *
451
+ * @deprecated
452
+ */
448
453
  get properties() { return this.inputs; }
449
454
  /**
450
455
  * Enumerates the set of event-bound output properties.
@@ -494,6 +499,11 @@ export class DirectiveMetadata extends InjectableMetadata {
494
499
  get outputs() {
495
500
  return isPresent(this._events) && this._events.length > 0 ? this._events : this._outputs;
496
501
  }
502
+ /**
503
+ * Use `outputs` instead
504
+ *
505
+ * @deprecated
506
+ */
497
507
  get events() { return this.outputs; }
498
508
  /**
499
509
  * Defines the set of injectable objects that are visible to a Directive and its light DOM
@@ -512,7 +522,7 @@ export class DirectiveMetadata extends InjectableMetadata {
512
522
  *
513
523
  * @Directive({
514
524
  * selector: 'greet',
515
- * bindings: [
525
+ * providers: [
516
526
  * Greeter
517
527
  * ]
518
528
  * })
@@ -525,12 +535,7 @@ export class DirectiveMetadata extends InjectableMetadata {
525
535
  * }
526
536
  * ```
527
537
  */
528
- get providers() {
529
- return isPresent(this._bindings) && this._bindings.length > 0 ? this._bindings :
530
- this._providers;
531
- }
532
- /** @deprecated */
533
- get bindings() { return this.providers; }
538
+ get providers() { return this._providers; }
534
539
  }
535
540
  /**
536
541
  * Declare reusable UI building blocks for an application.
@@ -558,9 +563,10 @@ export class DirectiveMetadata extends InjectableMetadata {
558
563
  *
559
564
  * {@example core/ts/metadata/metadata.ts region='component'}
560
565
  * @ts2dart_const
566
+ * @stable
561
567
  */
562
568
  export class ComponentMetadata extends DirectiveMetadata {
563
- constructor({ selector, inputs, outputs, properties, events, host, exportAs, moduleId, bindings, providers, viewBindings, viewProviders, changeDetection = ChangeDetectionStrategy.Default, queries, templateUrl, template, styleUrls, styles, directives, pipes, encapsulation } = {}) {
569
+ constructor({ selector, inputs, outputs, properties, events, host, exportAs, moduleId, providers, viewProviders, changeDetection = ChangeDetectionStrategy.Default, queries, templateUrl, template, styleUrls, styles, animations, directives, pipes, encapsulation } = {}) {
564
570
  super({
565
571
  selector: selector,
566
572
  inputs: inputs,
@@ -569,13 +575,11 @@ export class ComponentMetadata extends DirectiveMetadata {
569
575
  events: events,
570
576
  host: host,
571
577
  exportAs: exportAs,
572
- bindings: bindings,
573
578
  providers: providers,
574
579
  queries: queries
575
580
  });
576
581
  this.changeDetection = changeDetection;
577
582
  this._viewProviders = viewProviders;
578
- this._viewBindings = viewBindings;
579
583
  this.templateUrl = templateUrl;
580
584
  this.template = template;
581
585
  this.styleUrls = styleUrls;
@@ -584,6 +588,7 @@ export class ComponentMetadata extends DirectiveMetadata {
584
588
  this.pipes = pipes;
585
589
  this.encapsulation = encapsulation;
586
590
  this.moduleId = moduleId;
591
+ this.animations = animations;
587
592
  }
588
593
  /**
589
594
  * Defines the set of injectable objects that are visible to its view DOM children.
@@ -623,11 +628,7 @@ export class ComponentMetadata extends DirectiveMetadata {
623
628
  *
624
629
  * ```
625
630
  */
626
- get viewProviders() {
627
- return isPresent(this._viewBindings) && this._viewBindings.length > 0 ? this._viewBindings :
628
- this._viewProviders;
629
- }
630
- get viewBindings() { return this.viewProviders; }
631
+ get viewProviders() { return this._viewProviders; }
631
632
  }
632
633
  /**
633
634
  * Declare reusable pipe function.
@@ -640,6 +641,7 @@ export class ComponentMetadata extends DirectiveMetadata {
640
641
  *
641
642
  * {@example core/ts/metadata/metadata.ts region='pipe'}
642
643
  * @ts2dart_const
644
+ * @stable
643
645
  */
644
646
  export class PipeMetadata extends InjectableMetadata {
645
647
  constructor({ name, pure }) {
@@ -690,6 +692,7 @@ export class PipeMetadata extends InjectableMetadata {
690
692
  * bootstrap(App);
691
693
  * ```
692
694
  * @ts2dart_const
695
+ * @stable
693
696
  */
694
697
  export class InputMetadata {
695
698
  constructor(
@@ -741,6 +744,7 @@ export class InputMetadata {
741
744
  * bootstrap(App);
742
745
  * ```
743
746
  * @ts2dart_const
747
+ * @stable
744
748
  */
745
749
  export class OutputMetadata {
746
750
  constructor(bindingPropertyName) {
@@ -782,6 +786,7 @@ export class OutputMetadata {
782
786
  * bootstrap(App);
783
787
  * ```
784
788
  * @ts2dart_const
789
+ * @stable
785
790
  */
786
791
  export class HostBindingMetadata {
787
792
  constructor(hostPropertyName) {
@@ -822,6 +827,7 @@ export class HostBindingMetadata {
822
827
  * bootstrap(App);
823
828
  * ```
824
829
  * @ts2dart_const
830
+ * @stable
825
831
  */
826
832
  export class HostListenerMetadata {
827
833
  constructor(eventName, args) {
@@ -1 +1 @@
1
- {"version":3,"file":"directives.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/metadata/directives.ts"],"names":[],"mappings":"OAIS,EAAC,SAAS,EAAO,MAAM,uBAAuB;OAChD,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C,IAAI,EAAE,IAAI,EAAiC;QACtD,OAAO,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAI,IAAI,KAAc,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH;IACE;QACI;;WAEG;QACI,mBAA4B;QAA5B,wBAAmB,GAAnB,mBAAmB,CAAS;IAAG,CAAC;AAC7C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH;IACE,YAAmB,mBAA4B;QAA5B,wBAAmB,GAAnB,mBAAmB,CAAS;IAAG,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IACE,YAAmB,gBAAyB;QAAzB,qBAAgB,GAAhB,gBAAgB,CAAS;IAAG,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;IACE,YAAmB,SAAiB,EAAS,IAAe;QAAzC,cAAS,GAAT,SAAS,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAW;IAAG,CAAC;AAClE,CAAC;AAAA","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {isPresent, Type} from '../../src/facade/lang';\nimport {InjectableMetadata} from '../di/metadata';\nimport {ViewEncapsulation} from './view';\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\n\n/**\n * Directives allow you to attach behavior to elements in the DOM.\n *\n * {@link DirectiveMetadata}s with an embedded view are called {@link ComponentMetadata}s.\n *\n * A directive consists of a single directive annotation and a controller class. When the\n * directive's `selector` matches\n * elements in the DOM, the following steps occur:\n *\n * 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor\n * arguments.\n * 2. Angular instantiates directives for each matched element using `ElementInjector` in a\n * depth-first order,\n * as declared in the HTML.\n *\n * ## Understanding How Injection Works\n *\n * There are three stages of injection resolution.\n * - *Pre-existing Injectors*:\n * - The terminal {@link Injector} cannot resolve dependencies. It either throws an error or, if\n * the dependency was\n * specified as `@Optional`, returns `null`.\n * - The platform injector resolves browser singleton resources, such as: cookies, title,\n * location, and others.\n * - *Component Injectors*: Each component instance has its own {@link Injector}, and they follow\n * the same parent-child hierarchy\n * as the component instances in the DOM.\n * - *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each\n * element has an `ElementInjector`\n * which follow the same parent-child hierarchy as the DOM elements themselves.\n *\n * When a template is instantiated, it also must instantiate the corresponding directives in a\n * depth-first order. The\n * current `ElementInjector` resolves the constructor dependencies for each directive.\n *\n * Angular then resolves dependencies as follows, according to the order in which they appear in the\n * {@link ViewMetadata}:\n *\n * 1. Dependencies on the current element\n * 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary\n * 3. Dependencies on component injectors and their parents until it encounters the root component\n * 4. Dependencies on pre-existing injectors\n *\n *\n * The `ElementInjector` can inject other directives, element-specific special objects, or it can\n * delegate to the parent\n * injector.\n *\n * To inject other directives, declare the constructor parameter as:\n * - `directive:DirectiveType`: a directive on the current element only\n * - `@Host() directive:DirectiveType`: any directive that matches the type between the current\n * element and the\n * Shadow DOM root.\n * - `@Query(DirectiveType) query:QueryList<DirectiveType>`: A live collection of direct child\n * directives.\n * - `@QueryDescendants(DirectiveType) query:QueryList<DirectiveType>`: A live collection of any\n * child directives.\n *\n * To inject element-specific special objects, declare the constructor parameter as:\n * - `element: ElementRef` to obtain a reference to logical element in the view.\n * - `viewContainer: ViewContainerRef` to control child template instantiation, for\n * {@link DirectiveMetadata} directives only\n * - `bindingPropagation: BindingPropagation` to control change detection in a more granular way.\n *\n * ### Example\n *\n * The following example demonstrates how dependency injection resolves constructor arguments in\n * practice.\n *\n *\n * Assume this HTML template:\n *\n * ```\n * <div dependency=\"1\">\n * <div dependency=\"2\">\n * <div dependency=\"3\" my-directive>\n * <div dependency=\"4\">\n * <div dependency=\"5\"></div>\n * </div>\n * <div dependency=\"6\"></div>\n * </div>\n * </div>\n * </div>\n * ```\n *\n * With the following `dependency` decorator and `SomeService` injectable class.\n *\n * ```\n * @Injectable()\n * class SomeService {\n * }\n *\n * @Directive({\n * selector: '[dependency]',\n * inputs: [\n * 'id: dependency'\n * ]\n * })\n * class Dependency {\n * id:string;\n * }\n * ```\n *\n * Let's step through the different ways in which `MyDirective` could be declared...\n *\n *\n * ### No injection\n *\n * Here the constructor is declared with no arguments, therefore nothing is injected into\n * `MyDirective`.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor() {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with no dependencies.\n *\n *\n * ### Component-level injection\n *\n * Directives can inject any injectable instance from the closest component injector or any of its\n * parents.\n *\n * Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type\n * from the parent\n * component's injector.\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(someService: SomeService) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a dependency on `SomeService`.\n *\n *\n * ### Injecting a directive from the current element\n *\n * Directives can inject other directives declared on the current element.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(dependency: Dependency) {\n * expect(dependency.id).toEqual(3);\n * }\n * }\n * ```\n * This directive would be instantiated with `Dependency` declared at the same element, in this case\n * `dependency=\"3\"`.\n *\n * ### Injecting a directive from any ancestor elements\n *\n * Directives can inject other directives declared on any ancestor element (in the current Shadow\n * DOM), i.e. on the current element, the\n * parent element, or its parents.\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Host() dependency: Dependency) {\n * expect(dependency.id).toEqual(2);\n * }\n * }\n * ```\n *\n * `@Host` checks the current element, the parent, as well as its parents recursively. If\n * `dependency=\"2\"` didn't\n * exist on the direct parent, this injection would\n * have returned\n * `dependency=\"1\"`.\n *\n *\n * ### Injecting a live collection of direct child directives\n *\n *\n * A directive can also query for other child directives. Since parent directives are instantiated\n * before child directives, a directive can't simply inject the list of child directives. Instead,\n * the directive injects a {@link QueryList}, which updates its contents as children are added,\n * removed, or moved by a directive that uses a {@link ViewContainerRef} such as a `ngFor`, an\n * `ngIf`, or an `ngSwitch`.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Query(Dependency) dependencies:QueryList<Dependency>) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a {@link QueryList} which contains `Dependency` 4 and\n * `Dependency` 6. Here, `Dependency` 5 would not be included, because it is not a direct child.\n *\n * ### Injecting a live collection of descendant directives\n *\n * By passing the descendant flag to `@Query` above, we can include the children of the child\n * elements.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Query(Dependency, {descendants: true}) dependencies:QueryList<Dependency>) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6.\n *\n * ### Optional injection\n *\n * The normal behavior of directives is to return an error when a specified dependency cannot be\n * resolved. If you\n * would like to inject `null` on unresolved dependency instead, you can annotate that dependency\n * with `@Optional()`.\n * This explicitly permits the author of a template to treat some of the surrounding directives as\n * optional.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Optional() dependency:Dependency) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a `Dependency` directive found on the current element.\n * If none can be\n * found, the injector supplies `null` instead of throwing an error.\n *\n * ### Example\n *\n * Here we use a decorator directive to simply define basic tool-tip behavior.\n *\n * ```\n * @Directive({\n * selector: '[tooltip]',\n * inputs: [\n * 'text: tooltip'\n * ],\n * host: {\n * '(mouseenter)': 'onMouseEnter()',\n * '(mouseleave)': 'onMouseLeave()'\n * }\n * })\n * class Tooltip{\n * text:string;\n * overlay:Overlay; // NOT YET IMPLEMENTED\n * overlayManager:OverlayManager; // NOT YET IMPLEMENTED\n *\n * constructor(overlayManager:OverlayManager) {\n * this.overlay = overlay;\n * }\n *\n * onMouseEnter() {\n * // exact signature to be determined\n * this.overlay = this.overlayManager.open(text, ...);\n * }\n *\n * onMouseLeave() {\n * this.overlay.close();\n * this.overlay = null;\n * }\n * }\n * ```\n * In our HTML template, we can then add this behavior to a `<div>` or any other element with the\n * `tooltip` selector,\n * like so:\n *\n * ```\n * <div tooltip=\"some text here\"></div>\n * ```\n *\n * Directives can also control the instantiation, destruction, and positioning of inline template\n * elements:\n *\n * A directive uses a {@link ViewContainerRef} to instantiate, insert, move, and destroy views at\n * runtime.\n * The {@link ViewContainerRef} is created as a result of `<template>` element, and represents a\n * location in the current view\n * where these actions are performed.\n *\n * Views are always created as children of the current {@link ViewMetadata}, and as siblings of the\n * `<template>` element. Thus a\n * directive in a child view cannot inject the directive that created it.\n *\n * Since directives that create views via ViewContainers are common in Angular, and using the full\n * `<template>` element syntax is wordy, Angular\n * also supports a shorthand notation: `<li *foo=\"bar\">` and `<li template=\"foo: bar\">` are\n * equivalent.\n *\n * Thus,\n *\n * ```\n * <ul>\n * <li *foo=\"bar\" title=\"text\"></li>\n * </ul>\n * ```\n *\n * Expands in use to:\n *\n * ```\n * <ul>\n * <template [foo]=\"bar\">\n * <li title=\"text\"></li>\n * </template>\n * </ul>\n * ```\n *\n * Notice that although the shorthand places `*foo=\"bar\"` within the `<li>` element, the binding for\n * the directive\n * controller is correctly instantiated on the `<template>` element rather than the `<li>` element.\n *\n * ## Lifecycle hooks\n *\n * When the directive class implements some {@link ../../guide/lifecycle-hooks.html} the callbacks\n * are called by the change detection at defined points in time during the life of the directive.\n *\n * ### Example\n *\n * Let's suppose we want to implement the `unless` behavior, to conditionally include a template.\n *\n * Here is a simple directive that triggers on an `unless` selector:\n *\n * ```\n * @Directive({\n * selector: '[unless]',\n * inputs: ['unless']\n * })\n * export class Unless {\n * viewContainer: ViewContainerRef;\n * templateRef: TemplateRef;\n * prevCondition: boolean;\n *\n * constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef) {\n * this.viewContainer = viewContainer;\n * this.templateRef = templateRef;\n * this.prevCondition = null;\n * }\n *\n * set unless(newCondition) {\n * if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {\n * this.prevCondition = true;\n * this.viewContainer.clear();\n * } else if (!newCondition && (isBlank(this.prevCondition) || this.prevCondition)) {\n * this.prevCondition = false;\n * this.viewContainer.create(this.templateRef);\n * }\n * }\n * }\n * ```\n *\n * We can then use this `unless` selector in a template:\n * ```\n * <ul>\n * <li *unless=\"expr\"></li>\n * </ul>\n * ```\n *\n * Once the directive instantiates the child view, the shorthand notation for the template expands\n * and the result is:\n *\n * ```\n * <ul>\n * <template [unless]=\"exp\">\n * <li></li>\n * </template>\n * <li></li>\n * </ul>\n * ```\n *\n * Note also that although the `<li></li>` template still exists inside the `<template></template>`,\n * the instantiated\n * view occurs on the second `<li></li>` which is a sibling to the `<template>` element.\n * @ts2dart_const\n */\nexport class DirectiveMetadata extends InjectableMetadata {\n /**\n * The CSS selector that triggers the instantiation of a directive.\n *\n * Angular only allows directives to trigger on CSS selectors that do not cross element\n * boundaries.\n *\n * `selector` may be declared as one of the following:\n *\n * - `element-name`: select by element name.\n * - `.class`: select by class name.\n * - `[attribute]`: select by attribute name.\n * - `[attribute=value]`: select by attribute name and value.\n * - `:not(sub_selector)`: select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: select if either `selector1` or `selector2` matches.\n *\n *\n * ### Example\n *\n * Suppose we have a directive with an `input[type=text]` selector.\n *\n * And the following HTML:\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n * The directive would only be instantiated on the `<input type=\"text\">` element.\n *\n */\n selector: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n *\n * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property where the value is written.\n * - `bindingProperty` specifies the DOM property where the value is read from.\n *\n * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ivhfXY?p=preview))\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', 'id: account-id'],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n *\n * // this property is not bound, and won't be automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bank-name=\"RBC\" account-id=\"4747\"></bank-account>\n * `,\n * directives: [BankAccount]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n *\n */\n get inputs(): string[] {\n return isPresent(this._properties) && this._properties.length > 0 ? this._properties :\n this._inputs;\n }\n get properties(): string[] { return this.inputs; }\n private _inputs: string[];\n private _properties: string[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `bindingProperty` specifies the DOM property the event handler is attached to.\n *\n * ### Example ([live demo](http://plnkr.co/edit/d5CNq7?p=preview))\n *\n * ```typescript\n * @Directive({\n * selector: 'interval-dir',\n * outputs: ['everySecond', 'five5Secs: everyFiveSeconds']\n * })\n * class IntervalDir {\n * everySecond = new EventEmitter();\n * five5Secs = new EventEmitter();\n *\n * constructor() {\n * setInterval(() => this.everySecond.emit(\"event\"), 1000);\n * setInterval(() => this.five5Secs.emit(\"event\"), 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <interval-dir (everySecond)=\"everySecond()\" (everyFiveSeconds)=\"everyFiveSeconds()\">\n * </interval-dir>\n * `,\n * directives: [IntervalDir]\n * })\n * class App {\n * everySecond() { console.log('second'); }\n * everyFiveSeconds() { console.log('five seconds'); }\n * }\n * bootstrap(App);\n * ```\n *\n */\n get outputs(): string[] {\n return isPresent(this._events) && this._events.length > 0 ? this._events : this._outputs;\n }\n get events(): string[] { return this.outputs; }\n private _outputs: string[];\n private _events: string[];\n\n /**\n * Specify the events, actions, properties and attributes related to the host element.\n *\n * ## Host Listeners\n *\n * Specifies which DOM events a directive listens to via a set of `(event)` to `method`\n * key-value pairs:\n *\n * - `event`: the DOM event that the directive listens to.\n * - `statement`: the statement to execute when the event occurs.\n * If the evaluation of the statement returns `false`, then `preventDefault`is applied on the DOM\n * event.\n *\n * To listen to global events, a target must be added to the event name.\n * The target can be `window`, `document` or `body`.\n *\n * When writing a directive event binding, you can also refer to the $event local variable.\n *\n * ### Example ([live demo](http://plnkr.co/edit/DlA5KU?p=preview))\n *\n * The following example declares a directive that attaches a click listener to the button and\n * counts clicks.\n *\n * ```typescript\n * @Directive({\n * selector: 'button[counting]',\n * host: {\n * '(click)': 'onClick($event.target)'\n * }\n * })\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * onClick(btn) {\n * console.log(\"button\", btn, \"number of clicks:\", this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<button counting>Increment</button>`,\n * directives: [CountClicks]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n *\n * ## Host Property Bindings\n *\n * Specifies which DOM properties a directive updates.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, it will update the host element of the directive.\n *\n * ### Example ([live demo](http://plnkr.co/edit/gNg0ED?p=preview))\n *\n * The following example creates a directive that sets the `valid` and `invalid` classes\n * on the DOM element that has ngModel directive on it.\n *\n * ```typescript\n * @Directive({\n * selector: '[ngModel]',\n * host: {\n * '[class.valid]': 'valid',\n * '[class.invalid]': 'invalid'\n * }\n * })\n * class NgModelStatus {\n * constructor(public control:NgModel) {}\n * get valid { return this.control.valid; }\n * get invalid { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * directives: [FORM_DIRECTIVES, NgModelStatus]\n * })\n * class App {\n * prop;\n * }\n *\n * bootstrap(App);\n * ```\n *\n * ## Attributes\n *\n * Specifies static attributes that should be propagated to a host element.\n *\n * ### Example\n *\n * In this example using `my-button` directive (ex.: `<div my-button></div>`) on a host element\n * (here: `<div>` ) will ensure that this element will get the \"button\" role.\n *\n * ```typescript\n * @Directive({\n * selector: '[my-button]',\n * host: {\n * 'role': 'button'\n * }\n * })\n * class MyButton {\n * }\n * ```\n */\n host: {[key: string]: string};\n\n /**\n * Defines the set of injectable objects that are visible to a Directive and its light DOM\n * children.\n *\n * ## Simple Example\n *\n * Here is an example of a class that can be injected:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'greet',\n * bindings: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n get providers(): any[] {\n return isPresent(this._bindings) && this._bindings.length > 0 ? this._bindings :\n this._providers;\n }\n /** @deprecated */\n get bindings(): any[] { return this.providers; }\n private _providers: any[];\n private _bindings: any[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * ## Simple Example\n *\n * ```\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`,\n * directives: [ChildDir]\n * })\n * class MainComponent {\n * }\n *\n * ```\n */\n exportAs: string;\n\n // TODO: add an example after ContentChildren and ViewChildren are in master\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * ### Example\n *\n * ```\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>',\n * directives: [ChildDirective]\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n */\n queries: {[key: string]: any};\n\n constructor({selector, inputs, outputs, properties, events, host, bindings, providers, exportAs,\n queries}: {\n selector?: string,\n inputs?: string[],\n outputs?: string[],\n properties?: string[],\n events?: string[],\n host?: {[key: string]: string},\n providers?: any[],\n /** @deprecated */ bindings?: any[],\n exportAs?: string,\n queries?: {[key: string]: any}\n } = {}) {\n super();\n this.selector = selector;\n this._inputs = inputs;\n this._properties = properties;\n this._outputs = outputs;\n this._events = events;\n this.host = host;\n this.exportAs = exportAs;\n this.queries = queries;\n this._providers = providers;\n this._bindings = bindings;\n }\n}\n\n/**\n * Declare reusable UI building blocks for an application.\n *\n * Each Angular component requires a single `@Component` annotation. The\n * `@Component`\n * annotation specifies when a component is instantiated, and which properties and hostListeners it\n * binds to.\n *\n * When a component is instantiated, Angular\n * - creates a shadow DOM for the component.\n * - loads the selected template into the shadow DOM.\n * - creates all the injectable objects configured with `providers` and `viewProviders`.\n *\n * All template expressions and statements are then evaluated against the component instance.\n *\n * For details on the `@View` annotation, see {@link ViewMetadata}.\n *\n * ## Lifecycle hooks\n *\n * When the component class implements some {@link ../../guide/lifecycle-hooks.html} the callbacks\n * are called by the change detection at defined points in time during the life of the component.\n *\n * ### Example\n *\n * {@example core/ts/metadata/metadata.ts region='component'}\n * @ts2dart_const\n */\nexport class ComponentMetadata extends DirectiveMetadata {\n /**\n * Defines the used change detection strategy.\n *\n * When a component is instantiated, Angular creates a change detector, which is responsible for\n * propagating the component's bindings.\n *\n * The `changeDetection` property defines, whether the change detection will be checked every time\n * or only when the component tells it to do so.\n */\n changeDetection: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n *\n * ## Simple Example\n *\n * Here is an example of a class that can be injected:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`,\n * directives: [NeedsGreeter]\n * })\n * class HelloWorld {\n * }\n *\n * ```\n */\n get viewProviders(): any[] {\n return isPresent(this._viewBindings) && this._viewBindings.length > 0 ? this._viewBindings :\n this._viewProviders;\n }\n get viewBindings(): any[] { return this.viewProviders; }\n private _viewProviders: any[];\n private _viewBindings: any[];\n\n /**\n * The module id of the module that contains the component.\n * Needed to be able to resolve relative urls for templates and styles.\n * In Dart, this can be determined automatically and does not need to be set.\n * In CommonJS, this can always be set to `module.id`.\n *\n * ## Simple Example\n *\n * ```\n * @Directive({\n * selector: 'someDir',\n * moduleId: module.id\n * })\n * class SomeDir {\n * }\n *\n * ```\n */\n moduleId: string;\n\n templateUrl: string;\n\n template: string;\n\n styleUrls: string[];\n\n styles: string[];\n\n directives: Array<Type | any[]>;\n\n pipes: Array<Type | any[]>;\n\n encapsulation: ViewEncapsulation;\n\n constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, bindings,\n providers, viewBindings, viewProviders,\n changeDetection = ChangeDetectionStrategy.Default, queries, templateUrl, template,\n styleUrls, styles, directives, pipes, encapsulation}: {\n selector?: string,\n inputs?: string[],\n outputs?: string[],\n properties?: string[],\n events?: string[],\n host?: {[key: string]: string},\n /** @deprecated */ bindings?: any[],\n providers?: any[],\n exportAs?: string,\n moduleId?: string,\n /** @deprecated */ viewBindings?: any[],\n viewProviders?: any[],\n queries?: {[key: string]: any},\n changeDetection?: ChangeDetectionStrategy,\n templateUrl?: string,\n template?: string,\n styleUrls?: string[],\n styles?: string[],\n directives?: Array<Type | any[]>,\n pipes?: Array<Type | any[]>,\n encapsulation?: ViewEncapsulation\n } = {}) {\n super({\n selector: selector,\n inputs: inputs,\n outputs: outputs,\n properties: properties,\n events: events,\n host: host,\n exportAs: exportAs,\n bindings: bindings,\n providers: providers,\n queries: queries\n });\n\n this.changeDetection = changeDetection;\n this._viewProviders = viewProviders;\n this._viewBindings = viewBindings;\n this.templateUrl = templateUrl;\n this.template = template;\n this.styleUrls = styleUrls;\n this.styles = styles;\n this.directives = directives;\n this.pipes = pipes;\n this.encapsulation = encapsulation;\n this.moduleId = moduleId;\n }\n}\n\n/**\n * Declare reusable pipe function.\n *\n * A \"pure\" pipe is only re-evaluated when either the input or any of the arguments change.\n *\n * When not specified, pipes default to being pure.\n *\n * ### Example\n *\n * {@example core/ts/metadata/metadata.ts region='pipe'}\n * @ts2dart_const\n */\nexport class PipeMetadata extends InjectableMetadata {\n name: string;\n /** @internal */\n _pure: boolean;\n\n constructor({name, pure}: {name: string, pure?: boolean}) {\n super();\n this.name = name;\n this._pure = pure;\n }\n\n get pure(): boolean { return isPresent(this._pure) ? this._pure : true; }\n}\n\n/**\n * Declares a data-bound input property.\n *\n * Angular automatically updates data-bound properties during change detection.\n *\n * `InputMetadata` takes an optional parameter that specifies the name\n * used when instantiating a component in the template. When not provided,\n * the name of the decorated property is used.\n *\n * ### Example\n *\n * The following example creates a component with two input properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * @Input() bankName: string;\n * @Input('account-id') id: string;\n *\n * // this property is not bound, and won't be automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bank-name=\"RBC\" account-id=\"4747\"></bank-account>\n * `,\n * directives: [BankAccount]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n * @ts2dart_const\n */\nexport class InputMetadata {\n constructor(\n /**\n * Name used when instantiating a component in the template.\n */\n public bindingPropertyName?: string) {}\n}\n\n/**\n * Declares an event-bound output property.\n *\n * When an output property emits an event, an event handler attached to that event\n * the template is invoked.\n *\n * `OutputMetadata` takes an optional parameter that specifies the name\n * used when instantiating a component in the template. When not provided,\n * the name of the decorated property is used.\n *\n * ### Example\n *\n * ```typescript\n * @Directive({\n * selector: 'interval-dir',\n * })\n * class IntervalDir {\n * @Output() everySecond = new EventEmitter();\n * @Output('everyFiveSeconds') five5Secs = new EventEmitter();\n *\n * constructor() {\n * setInterval(() => this.everySecond.emit(\"event\"), 1000);\n * setInterval(() => this.five5Secs.emit(\"event\"), 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <interval-dir (everySecond)=\"everySecond()\" (everyFiveSeconds)=\"everyFiveSeconds()\">\n * </interval-dir>\n * `,\n * directives: [IntervalDir]\n * })\n * class App {\n * everySecond() { console.log('second'); }\n * everyFiveSeconds() { console.log('five seconds'); }\n * }\n * bootstrap(App);\n * ```\n * @ts2dart_const\n */\nexport class OutputMetadata {\n constructor(public bindingPropertyName?: string) {}\n}\n\n/**\n * Declares a host property binding.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, it will update the host element of the directive.\n *\n * `HostBindingMetadata` takes an optional parameter that specifies the property\n * name of the host element that will be updated. When not provided,\n * the class property name is used.\n *\n * ### Example\n *\n * The following example creates a directive that sets the `valid` and `invalid` classes\n * on the DOM element that has ngModel directive on it.\n *\n * ```typescript\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control:NgModel) {}\n * @HostBinding('class.valid') get valid { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * directives: [FORM_DIRECTIVES, NgModelStatus]\n * })\n * class App {\n * prop;\n * }\n *\n * bootstrap(App);\n * ```\n * @ts2dart_const\n */\nexport class HostBindingMetadata {\n constructor(public hostPropertyName?: string) {}\n}\n\n/**\n * Declares a host listener.\n *\n * Angular will invoke the decorated method when the host element emits the specified event.\n *\n * If the decorated method returns `false`, then `preventDefault` is applied on the DOM\n * event.\n *\n * ### Example\n *\n * The following example declares a directive that attaches a click listener to the button and\n * counts clicks.\n *\n * ```typescript\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log(\"button\", btn, \"number of clicks:\", this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<button counting>Increment</button>`,\n * directives: [CountClicks]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n * @ts2dart_const\n */\nexport class HostListenerMetadata {\n constructor(public eventName: string, public args?: string[]) {}\n}\n"]}
1
+ {"version":3,"file":"directives.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/metadata/directives.ts"],"names":[],"mappings":"OACO,EAAC,uBAAuB,EAAC,MAAM,+BAA+B;OAC9D,EAAC,kBAAkB,EAAC,MAAM,gBAAgB;OAC1C,EAAO,SAAS,EAAC,MAAM,gBAAgB;AAK9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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from '../change_detection/constants';\nimport {InjectableMetadata} from '../di/metadata';\nimport {Type, isPresent} from '../facade/lang';\n\nimport {ViewEncapsulation} from './view';\n\n\n/**\n * Directives allow you to attach behavior to elements in the DOM.\n *\n * {@link DirectiveMetadata}s with an embedded view are called {@link ComponentMetadata}s.\n *\n * A directive consists of a single directive annotation and a controller class. When the\n * directive's `selector` matches\n * elements in the DOM, the following steps occur:\n *\n * 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor\n * arguments.\n * 2. Angular instantiates directives for each matched element using `ElementInjector` in a\n * depth-first order,\n * as declared in the HTML.\n *\n * ## Understanding How Injection Works\n *\n * There are three stages of injection resolution.\n * - *Pre-existing Injectors*:\n * - The terminal {@link Injector} cannot resolve dependencies. It either throws an error or, if\n * the dependency was\n * specified as `@Optional`, returns `null`.\n * - The platform injector resolves browser singleton resources, such as: cookies, title,\n * location, and others.\n * - *Component Injectors*: Each component instance has its own {@link Injector}, and they follow\n * the same parent-child hierarchy\n * as the component instances in the DOM.\n * - *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each\n * element has an `ElementInjector`\n * which follow the same parent-child hierarchy as the DOM elements themselves.\n *\n * When a template is instantiated, it also must instantiate the corresponding directives in a\n * depth-first order. The\n * current `ElementInjector` resolves the constructor dependencies for each directive.\n *\n * Angular then resolves dependencies as follows, according to the order in which they appear in the\n * {@link ViewMetadata}:\n *\n * 1. Dependencies on the current element\n * 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary\n * 3. Dependencies on component injectors and their parents until it encounters the root component\n * 4. Dependencies on pre-existing injectors\n *\n *\n * The `ElementInjector` can inject other directives, element-specific special objects, or it can\n * delegate to the parent\n * injector.\n *\n * To inject other directives, declare the constructor parameter as:\n * - `directive:DirectiveType`: a directive on the current element only\n * - `@Host() directive:DirectiveType`: any directive that matches the type between the current\n * element and the\n * Shadow DOM root.\n * - `@Query(DirectiveType) query:QueryList<DirectiveType>`: A live collection of direct child\n * directives.\n * - `@QueryDescendants(DirectiveType) query:QueryList<DirectiveType>`: A live collection of any\n * child directives.\n *\n * To inject element-specific special objects, declare the constructor parameter as:\n * - `element: ElementRef` to obtain a reference to logical element in the view.\n * - `viewContainer: ViewContainerRef` to control child template instantiation, for\n * {@link DirectiveMetadata} directives only\n * - `bindingPropagation: BindingPropagation` to control change detection in a more granular way.\n *\n * ### Example\n *\n * The following example demonstrates how dependency injection resolves constructor arguments in\n * practice.\n *\n *\n * Assume this HTML template:\n *\n * ```\n * <div dependency=\"1\">\n * <div dependency=\"2\">\n * <div dependency=\"3\" my-directive>\n * <div dependency=\"4\">\n * <div dependency=\"5\"></div>\n * </div>\n * <div dependency=\"6\"></div>\n * </div>\n * </div>\n * </div>\n * ```\n *\n * With the following `dependency` decorator and `SomeService` injectable class.\n *\n * ```\n * @Injectable()\n * class SomeService {\n * }\n *\n * @Directive({\n * selector: '[dependency]',\n * inputs: [\n * 'id: dependency'\n * ]\n * })\n * class Dependency {\n * id:string;\n * }\n * ```\n *\n * Let's step through the different ways in which `MyDirective` could be declared...\n *\n *\n * ### No injection\n *\n * Here the constructor is declared with no arguments, therefore nothing is injected into\n * `MyDirective`.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor() {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with no dependencies.\n *\n *\n * ### Component-level injection\n *\n * Directives can inject any injectable instance from the closest component injector or any of its\n * parents.\n *\n * Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type\n * from the parent\n * component's injector.\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(someService: SomeService) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a dependency on `SomeService`.\n *\n *\n * ### Injecting a directive from the current element\n *\n * Directives can inject other directives declared on the current element.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(dependency: Dependency) {\n * expect(dependency.id).toEqual(3);\n * }\n * }\n * ```\n * This directive would be instantiated with `Dependency` declared at the same element, in this case\n * `dependency=\"3\"`.\n *\n * ### Injecting a directive from any ancestor elements\n *\n * Directives can inject other directives declared on any ancestor element (in the current Shadow\n * DOM), i.e. on the current element, the\n * parent element, or its parents.\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Host() dependency: Dependency) {\n * expect(dependency.id).toEqual(2);\n * }\n * }\n * ```\n *\n * `@Host` checks the current element, the parent, as well as its parents recursively. If\n * `dependency=\"2\"` didn't\n * exist on the direct parent, this injection would\n * have returned\n * `dependency=\"1\"`.\n *\n *\n * ### Injecting a live collection of direct child directives\n *\n *\n * A directive can also query for other child directives. Since parent directives are instantiated\n * before child directives, a directive can't simply inject the list of child directives. Instead,\n * the directive injects a {@link QueryList}, which updates its contents as children are added,\n * removed, or moved by a directive that uses a {@link ViewContainerRef} such as a `ngFor`, an\n * `ngIf`, or an `ngSwitch`.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Query(Dependency) dependencies:QueryList<Dependency>) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a {@link QueryList} which contains `Dependency` 4 and\n * `Dependency` 6. Here, `Dependency` 5 would not be included, because it is not a direct child.\n *\n * ### Injecting a live collection of descendant directives\n *\n * By passing the descendant flag to `@Query` above, we can include the children of the child\n * elements.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Query(Dependency, {descendants: true}) dependencies:QueryList<Dependency>) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6.\n *\n * ### Optional injection\n *\n * The normal behavior of directives is to return an error when a specified dependency cannot be\n * resolved. If you\n * would like to inject `null` on unresolved dependency instead, you can annotate that dependency\n * with `@Optional()`.\n * This explicitly permits the author of a template to treat some of the surrounding directives as\n * optional.\n *\n * ```\n * @Directive({ selector: '[my-directive]' })\n * class MyDirective {\n * constructor(@Optional() dependency:Dependency) {\n * }\n * }\n * ```\n *\n * This directive would be instantiated with a `Dependency` directive found on the current element.\n * If none can be\n * found, the injector supplies `null` instead of throwing an error.\n *\n * ### Example\n *\n * Here we use a decorator directive to simply define basic tool-tip behavior.\n *\n * ```\n * @Directive({\n * selector: '[tooltip]',\n * inputs: [\n * 'text: tooltip'\n * ],\n * host: {\n * '(mouseenter)': 'onMouseEnter()',\n * '(mouseleave)': 'onMouseLeave()'\n * }\n * })\n * class Tooltip{\n * text:string;\n * overlay:Overlay; // NOT YET IMPLEMENTED\n * overlayManager:OverlayManager; // NOT YET IMPLEMENTED\n *\n * constructor(overlayManager:OverlayManager) {\n * this.overlay = overlay;\n * }\n *\n * onMouseEnter() {\n * // exact signature to be determined\n * this.overlay = this.overlayManager.open(text, ...);\n * }\n *\n * onMouseLeave() {\n * this.overlay.close();\n * this.overlay = null;\n * }\n * }\n * ```\n * In our HTML template, we can then add this behavior to a `<div>` or any other element with the\n * `tooltip` selector,\n * like so:\n *\n * ```\n * <div tooltip=\"some text here\"></div>\n * ```\n *\n * Directives can also control the instantiation, destruction, and positioning of inline template\n * elements:\n *\n * A directive uses a {@link ViewContainerRef} to instantiate, insert, move, and destroy views at\n * runtime.\n * The {@link ViewContainerRef} is created as a result of `<template>` element, and represents a\n * location in the current view\n * where these actions are performed.\n *\n * Views are always created as children of the current {@link ViewMetadata}, and as siblings of the\n * `<template>` element. Thus a\n * directive in a child view cannot inject the directive that created it.\n *\n * Since directives that create views via ViewContainers are common in Angular, and using the full\n * `<template>` element syntax is wordy, Angular\n * also supports a shorthand notation: `<li *foo=\"bar\">` and `<li template=\"foo: bar\">` are\n * equivalent.\n *\n * Thus,\n *\n * ```\n * <ul>\n * <li *foo=\"bar\" title=\"text\"></li>\n * </ul>\n * ```\n *\n * Expands in use to:\n *\n * ```\n * <ul>\n * <template [foo]=\"bar\">\n * <li title=\"text\"></li>\n * </template>\n * </ul>\n * ```\n *\n * Notice that although the shorthand places `*foo=\"bar\"` within the `<li>` element, the binding for\n * the directive\n * controller is correctly instantiated on the `<template>` element rather than the `<li>` element.\n *\n * ## Lifecycle hooks\n *\n * When the directive class implements some {@link ../../guide/lifecycle-hooks.html} the callbacks\n * are called by the change detection at defined points in time during the life of the directive.\n *\n * ### Example\n *\n * Let's suppose we want to implement the `unless` behavior, to conditionally include a template.\n *\n * Here is a simple directive that triggers on an `unless` selector:\n *\n * ```\n * @Directive({\n * selector: '[unless]',\n * inputs: ['unless']\n * })\n * export class Unless {\n * viewContainer: ViewContainerRef;\n * templateRef: TemplateRef;\n * prevCondition: boolean;\n *\n * constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef) {\n * this.viewContainer = viewContainer;\n * this.templateRef = templateRef;\n * this.prevCondition = null;\n * }\n *\n * set unless(newCondition) {\n * if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {\n * this.prevCondition = true;\n * this.viewContainer.clear();\n * } else if (!newCondition && (isBlank(this.prevCondition) || this.prevCondition)) {\n * this.prevCondition = false;\n * this.viewContainer.create(this.templateRef);\n * }\n * }\n * }\n * ```\n *\n * We can then use this `unless` selector in a template:\n * ```\n * <ul>\n * <li *unless=\"expr\"></li>\n * </ul>\n * ```\n *\n * Once the directive instantiates the child view, the shorthand notation for the template expands\n * and the result is:\n *\n * ```\n * <ul>\n * <template [unless]=\"exp\">\n * <li></li>\n * </template>\n * <li></li>\n * </ul>\n * ```\n *\n * Note also that although the `<li></li>` template still exists inside the `<template></template>`,\n * the instantiated\n * view occurs on the second `<li></li>` which is a sibling to the `<template>` element.\n * @ts2dart_const\n * @stable\n */\nexport class DirectiveMetadata extends InjectableMetadata {\n /**\n * The CSS selector that triggers the instantiation of a directive.\n *\n * Angular only allows directives to trigger on CSS selectors that do not cross element\n * boundaries.\n *\n * `selector` may be declared as one of the following:\n *\n * - `element-name`: select by element name.\n * - `.class`: select by class name.\n * - `[attribute]`: select by attribute name.\n * - `[attribute=value]`: select by attribute name and value.\n * - `:not(sub_selector)`: select only if the element does not match the `sub_selector`.\n * - `selector1, selector2`: select if either `selector1` or `selector2` matches.\n *\n *\n * ### Example\n *\n * Suppose we have a directive with an `input[type=text]` selector.\n *\n * And the following HTML:\n *\n * ```html\n * <form>\n * <input type=\"text\">\n * <input type=\"radio\">\n * <form>\n * ```\n *\n * The directive would only be instantiated on the `<input type=\"text\">` element.\n *\n */\n selector: string;\n\n /**\n * Enumerates the set of data-bound input properties for a directive\n *\n * Angular automatically updates input properties during change detection.\n *\n * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property where the value is written.\n * - `bindingProperty` specifies the DOM property where the value is read from.\n *\n * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ivhfXY?p=preview))\n *\n * The following example creates a component with two data-bound properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * inputs: ['bankName', 'id: account-id'],\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * bankName: string;\n * id: string;\n *\n * // this property is not bound, and won't be automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bank-name=\"RBC\" account-id=\"4747\"></bank-account>\n * `,\n * directives: [BankAccount]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n *\n */\n get inputs(): string[] {\n return isPresent(this._properties) && this._properties.length > 0 ? this._properties :\n this._inputs;\n }\n /**\n * Use `inputs` instead\n *\n * @deprecated\n */\n get properties(): string[] { return this.inputs; }\n private _inputs: string[];\n private _properties: string[];\n\n /**\n * Enumerates the set of event-bound output properties.\n *\n * When an output property emits an event, an event handler attached to that event\n * the template is invoked.\n *\n * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`\n * configuration:\n *\n * - `directiveProperty` specifies the component property that emits events.\n * - `bindingProperty` specifies the DOM property the event handler is attached to.\n *\n * ### Example ([live demo](http://plnkr.co/edit/d5CNq7?p=preview))\n *\n * ```typescript\n * @Directive({\n * selector: 'interval-dir',\n * outputs: ['everySecond', 'five5Secs: everyFiveSeconds']\n * })\n * class IntervalDir {\n * everySecond = new EventEmitter();\n * five5Secs = new EventEmitter();\n *\n * constructor() {\n * setInterval(() => this.everySecond.emit(\"event\"), 1000);\n * setInterval(() => this.five5Secs.emit(\"event\"), 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <interval-dir (everySecond)=\"everySecond()\" (everyFiveSeconds)=\"everyFiveSeconds()\">\n * </interval-dir>\n * `,\n * directives: [IntervalDir]\n * })\n * class App {\n * everySecond() { console.log('second'); }\n * everyFiveSeconds() { console.log('five seconds'); }\n * }\n * bootstrap(App);\n * ```\n *\n */\n get outputs(): string[] {\n return isPresent(this._events) && this._events.length > 0 ? this._events : this._outputs;\n }\n /**\n * Use `outputs` instead\n *\n * @deprecated\n */\n get events(): string[] { return this.outputs; }\n private _outputs: string[];\n private _events: string[];\n\n /**\n * Specify the events, actions, properties and attributes related to the host element.\n *\n * ## Host Listeners\n *\n * Specifies which DOM events a directive listens to via a set of `(event)` to `method`\n * key-value pairs:\n *\n * - `event`: the DOM event that the directive listens to.\n * - `statement`: the statement to execute when the event occurs.\n * If the evaluation of the statement returns `false`, then `preventDefault`is applied on the DOM\n * event.\n *\n * To listen to global events, a target must be added to the event name.\n * The target can be `window`, `document` or `body`.\n *\n * When writing a directive event binding, you can also refer to the $event local variable.\n *\n * ### Example ([live demo](http://plnkr.co/edit/DlA5KU?p=preview))\n *\n * The following example declares a directive that attaches a click listener to the button and\n * counts clicks.\n *\n * ```typescript\n * @Directive({\n * selector: 'button[counting]',\n * host: {\n * '(click)': 'onClick($event.target)'\n * }\n * })\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * onClick(btn) {\n * console.log(\"button\", btn, \"number of clicks:\", this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<button counting>Increment</button>`,\n * directives: [CountClicks]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n *\n * ## Host Property Bindings\n *\n * Specifies which DOM properties a directive updates.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, it will update the host element of the directive.\n *\n * ### Example ([live demo](http://plnkr.co/edit/gNg0ED?p=preview))\n *\n * The following example creates a directive that sets the `valid` and `invalid` classes\n * on the DOM element that has ngModel directive on it.\n *\n * ```typescript\n * @Directive({\n * selector: '[ngModel]',\n * host: {\n * '[class.valid]': 'valid',\n * '[class.invalid]': 'invalid'\n * }\n * })\n * class NgModelStatus {\n * constructor(public control:NgModel) {}\n * get valid { return this.control.valid; }\n * get invalid { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * directives: [FORM_DIRECTIVES, NgModelStatus]\n * })\n * class App {\n * prop;\n * }\n *\n * bootstrap(App);\n * ```\n *\n * ## Attributes\n *\n * Specifies static attributes that should be propagated to a host element.\n *\n * ### Example\n *\n * In this example using `my-button` directive (ex.: `<div my-button></div>`) on a host element\n * (here: `<div>` ) will ensure that this element will get the \"button\" role.\n *\n * ```typescript\n * @Directive({\n * selector: '[my-button]',\n * host: {\n * 'role': 'button'\n * }\n * })\n * class MyButton {\n * }\n * ```\n */\n host: {[key: string]: string};\n\n /**\n * Defines the set of injectable objects that are visible to a Directive and its light DOM\n * children.\n *\n * ## Simple Example\n *\n * Here is an example of a class that can be injected:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'greet',\n * providers: [\n * Greeter\n * ]\n * })\n * class HelloWorld {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n * ```\n */\n get providers(): any[] { return this._providers; }\n private _providers: any[];\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * ## Simple Example\n *\n * ```\n * @Directive({\n * selector: 'child-dir',\n * exportAs: 'child'\n * })\n * class ChildDir {\n * }\n *\n * @Component({\n * selector: 'main',\n * template: `<child-dir #c=\"child\"></child-dir>`,\n * directives: [ChildDir]\n * })\n * class MainComponent {\n * }\n *\n * ```\n */\n exportAs: string;\n\n // TODO: add an example after ContentChildren and ViewChildren are in master\n /**\n * Configures the queries that will be injected into the directive.\n *\n * Content queries are set before the `ngAfterContentInit` callback is called.\n * View queries are set before the `ngAfterViewInit` callback is called.\n *\n * ### Example\n *\n * ```\n * @Component({\n * selector: 'someDir',\n * queries: {\n * contentChildren: new ContentChildren(ChildDirective),\n * viewChildren: new ViewChildren(ChildDirective)\n * },\n * template: '<child-directive></child-directive>',\n * directives: [ChildDirective]\n * })\n * class SomeDir {\n * contentChildren: QueryList<ChildDirective>,\n * viewChildren: QueryList<ChildDirective>\n *\n * ngAfterContentInit() {\n * // contentChildren is set\n * }\n *\n * ngAfterViewInit() {\n * // viewChildren is set\n * }\n * }\n * ```\n */\n queries: {[key: string]: any};\n\n constructor({selector, inputs, outputs, properties, events, host, providers, exportAs, queries}: {\n selector?: string,\n inputs?: string[],\n outputs?: string[],\n /** @deprecated */ properties?: string[],\n /** @deprecated */ events?: string[],\n host?: {[key: string]: string},\n providers?: any[],\n exportAs?: string,\n queries?: {[key: string]: any}\n } = {}) {\n super();\n this.selector = selector;\n this._inputs = inputs;\n this._properties = properties;\n this._outputs = outputs;\n this._events = events;\n this.host = host;\n this.exportAs = exportAs;\n this.queries = queries;\n this._providers = providers;\n }\n}\n\n/**\n * Declare reusable UI building blocks for an application.\n *\n * Each Angular component requires a single `@Component` annotation. The\n * `@Component`\n * annotation specifies when a component is instantiated, and which properties and hostListeners it\n * binds to.\n *\n * When a component is instantiated, Angular\n * - creates a shadow DOM for the component.\n * - loads the selected template into the shadow DOM.\n * - creates all the injectable objects configured with `providers` and `viewProviders`.\n *\n * All template expressions and statements are then evaluated against the component instance.\n *\n * For details on the `@View` annotation, see {@link ViewMetadata}.\n *\n * ## Lifecycle hooks\n *\n * When the component class implements some {@link ../../guide/lifecycle-hooks.html} the callbacks\n * are called by the change detection at defined points in time during the life of the component.\n *\n * ### Example\n *\n * {@example core/ts/metadata/metadata.ts region='component'}\n * @ts2dart_const\n * @stable\n */\nexport class ComponentMetadata extends DirectiveMetadata {\n /**\n * Defines the used change detection strategy.\n *\n * When a component is instantiated, Angular creates a change detector, which is responsible for\n * propagating the component's bindings.\n *\n * The `changeDetection` property defines, whether the change detection will be checked every time\n * or only when the component tells it to do so.\n */\n changeDetection: ChangeDetectionStrategy;\n\n /**\n * Defines the set of injectable objects that are visible to its view DOM children.\n *\n * ## Simple Example\n *\n * Here is an example of a class that can be injected:\n *\n * ```\n * class Greeter {\n * greet(name:string) {\n * return 'Hello ' + name + '!';\n * }\n * }\n *\n * @Directive({\n * selector: 'needs-greeter'\n * })\n * class NeedsGreeter {\n * greeter:Greeter;\n *\n * constructor(greeter:Greeter) {\n * this.greeter = greeter;\n * }\n * }\n *\n * @Component({\n * selector: 'greet',\n * viewProviders: [\n * Greeter\n * ],\n * template: `<needs-greeter></needs-greeter>`,\n * directives: [NeedsGreeter]\n * })\n * class HelloWorld {\n * }\n *\n * ```\n */\n get viewProviders(): any[] { return this._viewProviders; }\n private _viewProviders: any[];\n\n /**\n * The module id of the module that contains the component.\n * Needed to be able to resolve relative urls for templates and styles.\n * In CommonJS, this can always be set to `module.id`, similarly SystemJS exposes `__moduleName`\n * variable within each module.\n *\n * In Dart, this can be determined automatically and does not need to be set.\n\n *\n * ## Simple Example\n *\n * ```\n * @Directive({\n * selector: 'someDir',\n * moduleId: module.id\n * })\n * class SomeDir {\n * }\n *\n * ```\n */\n moduleId: string;\n\n templateUrl: string;\n\n template: string;\n\n styleUrls: string[];\n\n styles: string[];\n\n /**\n * Animations are defined on components via an animation-like DSL. This DSL approach to describing\n * animations allows for a flexibility that both benefits developers and the framework.\n *\n * Animations work by listening on state changes that occur on an element within\n * the template. When a state change occurs, Angular can then take advantage and animate the\n * arc in between. This works similar to how CSS transitions work, however, by having a\n * programmatic DSL, animations are not limited to environments that are DOM-specific.\n * (Angular can also perform optimizations behind the scenes to make animations more performant.)\n *\n * For animations to be available for use, animation state changes are placed within\n * {@link trigger animation triggers} which are housed inside of the `animations` annotation\n * metadata. Within a trigger both {@link state state} and {@link transition transition} entries\n * can be placed.\n *\n * ```typescript\n * @Component({\n * selector: 'animation-cmp',\n * templateUrl: 'animation-cmp.html',\n * animations: [\n * // this here is our animation trigger that\n * // will contain our state change animations.\n * trigger('myTriggerName', [\n * // the styles defined for the `on` and `off`\n * // states declared below are persisted on the\n * // element once the animation completes.\n * state('on', style({ opacity: 1 }),\n * state('off', style({ opacity: 0 }),\n *\n * // this here is our animation that kicks off when\n * // this state change jump is true\n * transition('on => off', [\n * animate(\"1s\")\n * ])\n * ])\n * ]\n * })\n * ```\n *\n * As depicted in the code above, a group of related animation states are all contained within\n * an animation `trigger` (the code example above called the trigger `myTriggerName`).\n * When a trigger is created then it can be bound onto an element within the component's\n * template via a property prefixed by an `@` symbol followed by trigger name and an expression\n * that\n * is used to determine the state value for that trigger.\n *\n * ```html\n * <!-- animation-cmp.html -->\n * <div @myTriggerName=\"expression\">...</div>\n * ```\n *\n * For state changes to be executed, the `expression` value must change value from its existing\n * value\n * to something that we have set an animation to animate on (in the example above we are listening\n * to a change of state between `on` and `off`). The `expression` value attached to the trigger\n * must be something that can be evaluated with the template/component context.\n *\n * ### DSL Animation Functions\n *\n * Please visit each of the animation DSL functions listed below to gain a better understanding\n * of how and why they are used for crafting animations in Angular2:\n *\n * - {@link trigger trigger()}\n * - {@link state state()}\n * - {@link transition transition()}\n * - {@link group group()}\n * - {@link sequence sequence()}\n * - {@link style style()}\n * - {@link animate animate()}\n * - {@link keyframes keyframes()}\n */\n animations: AnimationEntryMetadata[];\n\n directives: Array<Type|any[]>;\n\n pipes: Array<Type|any[]>;\n\n encapsulation: ViewEncapsulation;\n\n constructor({selector,\n inputs,\n outputs,\n properties,\n events,\n host,\n exportAs,\n moduleId,\n providers,\n viewProviders,\n changeDetection = ChangeDetectionStrategy.Default,\n queries,\n templateUrl,\n template,\n styleUrls,\n styles,\n animations,\n directives,\n pipes,\n encapsulation}: {\n selector?: string,\n inputs?: string[],\n outputs?: string[],\n /** @deprecated */ properties?: string[],\n /** @deprecated */ events?: string[],\n host?: {[key: string]: string},\n providers?: any[],\n exportAs?: string,\n moduleId?: string,\n viewProviders?: any[],\n queries?: {[key: string]: any},\n changeDetection?: ChangeDetectionStrategy,\n templateUrl?: string,\n template?: string,\n styleUrls?: string[],\n styles?: string[],\n animations?: AnimationEntryMetadata[],\n directives?: Array<Type|any[]>,\n pipes?: Array<Type|any[]>,\n encapsulation?: ViewEncapsulation\n } = {}) {\n super({\n selector: selector,\n inputs: inputs,\n outputs: outputs,\n properties: properties,\n events: events,\n host: host,\n exportAs: exportAs,\n providers: providers,\n queries: queries\n });\n\n this.changeDetection = changeDetection;\n this._viewProviders = viewProviders;\n this.templateUrl = templateUrl;\n this.template = template;\n this.styleUrls = styleUrls;\n this.styles = styles;\n this.directives = directives;\n this.pipes = pipes;\n this.encapsulation = encapsulation;\n this.moduleId = moduleId;\n this.animations = animations;\n }\n}\n\n/**\n * Declare reusable pipe function.\n *\n * A \"pure\" pipe is only re-evaluated when either the input or any of the arguments change.\n *\n * When not specified, pipes default to being pure.\n *\n * ### Example\n *\n * {@example core/ts/metadata/metadata.ts region='pipe'}\n * @ts2dart_const\n * @stable\n */\nexport class PipeMetadata extends InjectableMetadata {\n name: string;\n /** @internal */\n _pure: boolean;\n\n constructor({name, pure}: {name: string, pure?: boolean}) {\n super();\n this.name = name;\n this._pure = pure;\n }\n\n get pure(): boolean { return isPresent(this._pure) ? this._pure : true; }\n}\n\n/**\n * Declares a data-bound input property.\n *\n * Angular automatically updates data-bound properties during change detection.\n *\n * `InputMetadata` takes an optional parameter that specifies the name\n * used when instantiating a component in the template. When not provided,\n * the name of the decorated property is used.\n *\n * ### Example\n *\n * The following example creates a component with two input properties.\n *\n * ```typescript\n * @Component({\n * selector: 'bank-account',\n * template: `\n * Bank Name: {{bankName}}\n * Account Id: {{id}}\n * `\n * })\n * class BankAccount {\n * @Input() bankName: string;\n * @Input('account-id') id: string;\n *\n * // this property is not bound, and won't be automatically updated by Angular\n * normalizedBankName: string;\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <bank-account bank-name=\"RBC\" account-id=\"4747\"></bank-account>\n * `,\n * directives: [BankAccount]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n * @ts2dart_const\n * @stable\n */\nexport class InputMetadata {\n constructor(\n /**\n * Name used when instantiating a component in the template.\n */\n public bindingPropertyName?: string) {}\n}\n\n/**\n * Declares an event-bound output property.\n *\n * When an output property emits an event, an event handler attached to that event\n * the template is invoked.\n *\n * `OutputMetadata` takes an optional parameter that specifies the name\n * used when instantiating a component in the template. When not provided,\n * the name of the decorated property is used.\n *\n * ### Example\n *\n * ```typescript\n * @Directive({\n * selector: 'interval-dir',\n * })\n * class IntervalDir {\n * @Output() everySecond = new EventEmitter();\n * @Output('everyFiveSeconds') five5Secs = new EventEmitter();\n *\n * constructor() {\n * setInterval(() => this.everySecond.emit(\"event\"), 1000);\n * setInterval(() => this.five5Secs.emit(\"event\"), 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `\n * <interval-dir (everySecond)=\"everySecond()\" (everyFiveSeconds)=\"everyFiveSeconds()\">\n * </interval-dir>\n * `,\n * directives: [IntervalDir]\n * })\n * class App {\n * everySecond() { console.log('second'); }\n * everyFiveSeconds() { console.log('five seconds'); }\n * }\n * bootstrap(App);\n * ```\n * @ts2dart_const\n * @stable\n */\nexport class OutputMetadata {\n constructor(public bindingPropertyName?: string) {}\n}\n\n/**\n * Declares a host property binding.\n *\n * Angular automatically checks host property bindings during change detection.\n * If a binding changes, it will update the host element of the directive.\n *\n * `HostBindingMetadata` takes an optional parameter that specifies the property\n * name of the host element that will be updated. When not provided,\n * the class property name is used.\n *\n * ### Example\n *\n * The following example creates a directive that sets the `valid` and `invalid` classes\n * on the DOM element that has ngModel directive on it.\n *\n * ```typescript\n * @Directive({selector: '[ngModel]'})\n * class NgModelStatus {\n * constructor(public control:NgModel) {}\n * @HostBinding('class.valid') get valid { return this.control.valid; }\n * @HostBinding('class.invalid') get invalid { return this.control.invalid; }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<input [(ngModel)]=\"prop\">`,\n * directives: [FORM_DIRECTIVES, NgModelStatus]\n * })\n * class App {\n * prop;\n * }\n *\n * bootstrap(App);\n * ```\n * @ts2dart_const\n * @stable\n */\nexport class HostBindingMetadata {\n constructor(public hostPropertyName?: string) {}\n}\n\n/**\n * Declares a host listener.\n *\n * Angular will invoke the decorated method when the host element emits the specified event.\n *\n * If the decorated method returns `false`, then `preventDefault` is applied on the DOM\n * event.\n *\n * ### Example\n *\n * The following example declares a directive that attaches a click listener to the button and\n * counts clicks.\n *\n * ```typescript\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log(\"button\", btn, \"number of clicks:\", this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: `<button counting>Increment</button>`,\n * directives: [CountClicks]\n * })\n * class App {}\n *\n * bootstrap(App);\n * ```\n * @ts2dart_const\n * @stable\n */\nexport class HostListenerMetadata {\n constructor(public eventName: string, public args?: string[]) {}\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}