@angular/platform-browser-dynamic 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 (114) hide show
  1. package/{platform-browser-dynamic.umd.js → bundles/platform-browser-dynamic.umd.js} +107 -65
  2. package/bundles/platform-browser-dynamic.umd.min.js +1 -0
  3. package/core_private.d.ts +1 -1
  4. package/core_private.js +1 -0
  5. package/core_private.js.map +1 -1
  6. package/core_private.metadata.json +1 -1
  7. package/esm/core_private.d.ts +1 -1
  8. package/esm/core_private.js +1 -0
  9. package/esm/core_private.js.map +1 -1
  10. package/esm/core_private.metadata.json +1 -1
  11. package/esm/index.d.ts +74 -1
  12. package/esm/index.js +129 -1
  13. package/esm/index.js.map +1 -1
  14. package/esm/index.metadata.json +1 -0
  15. package/esm/platform_browser_private.d.ts +2 -3
  16. package/esm/platform_browser_private.js +2 -3
  17. package/esm/platform_browser_private.js.map +1 -1
  18. package/esm/platform_browser_private.metadata.json +1 -0
  19. package/esm/private_export_testing.d.ts +8 -0
  20. package/esm/private_export_testing.js +5 -0
  21. package/esm/private_export_testing.js.map +1 -0
  22. package/esm/private_export_testing.metadata.json +1 -0
  23. package/esm/src/facade/async.d.ts +90 -0
  24. package/esm/src/facade/async.js +137 -0
  25. package/esm/src/facade/async.js.map +1 -0
  26. package/esm/src/facade/base_wrapped_exception.js +4 -4
  27. package/esm/src/facade/base_wrapped_exception.js.map +1 -1
  28. package/esm/src/facade/collection.js +1 -1
  29. package/esm/src/facade/collection.js.map +1 -1
  30. package/esm/src/facade/collection.metadata.json +1 -1
  31. package/esm/src/facade/exception_handler.d.ts +2 -11
  32. package/esm/src/facade/exception_handler.js +8 -7
  33. package/esm/src/facade/exception_handler.js.map +1 -1
  34. package/esm/src/facade/exceptions.d.ts +4 -0
  35. package/esm/src/facade/exceptions.js +6 -2
  36. package/esm/src/facade/exceptions.js.map +1 -1
  37. package/esm/src/facade/exceptions.metadata.json +1 -0
  38. package/esm/src/facade/lang.d.ts +6 -4
  39. package/esm/src/facade/lang.js +12 -11
  40. package/esm/src/facade/lang.js.map +1 -1
  41. package/esm/src/facade/lang.metadata.json +1 -1
  42. package/esm/src/facade/promise.js.map +1 -1
  43. package/esm/src/xhr/xhr_cache.js +3 -3
  44. package/esm/src/xhr/xhr_cache.js.map +1 -1
  45. package/esm/src/xhr/xhr_impl.js +2 -2
  46. package/esm/src/xhr/xhr_impl.js.map +1 -1
  47. package/esm/testing/dom_test_component_renderer.d.ts +9 -0
  48. package/esm/testing/dom_test_component_renderer.js +29 -0
  49. package/esm/testing/dom_test_component_renderer.js.map +1 -0
  50. package/esm/testing/dom_test_component_renderer.metadata.json +1 -0
  51. package/esm/testing.d.ts +9 -1
  52. package/esm/testing.js +22 -1
  53. package/esm/testing.js.map +1 -1
  54. package/esm/testing.metadata.json +1 -0
  55. package/index.d.ts +74 -1
  56. package/index.js +131 -3
  57. package/index.js.map +1 -1
  58. package/index.metadata.json +1 -0
  59. package/package.json +5 -5
  60. package/platform_browser_private.d.ts +2 -3
  61. package/platform_browser_private.js +1 -3
  62. package/platform_browser_private.js.map +1 -1
  63. package/platform_browser_private.metadata.json +1 -0
  64. package/private_export_testing.d.ts +8 -0
  65. package/private_export_testing.js +6 -0
  66. package/private_export_testing.js.map +1 -0
  67. package/private_export_testing.metadata.json +1 -0
  68. package/src/facade/async.d.ts +90 -0
  69. package/src/facade/async.js +160 -0
  70. package/src/facade/async.js.map +1 -0
  71. package/src/facade/base_wrapped_exception.js +4 -4
  72. package/src/facade/base_wrapped_exception.js.map +1 -1
  73. package/src/facade/collection.js.map +1 -1
  74. package/src/facade/collection.metadata.json +1 -1
  75. package/src/facade/exception_handler.d.ts +2 -11
  76. package/src/facade/exception_handler.js +8 -7
  77. package/src/facade/exception_handler.js.map +1 -1
  78. package/src/facade/exceptions.d.ts +4 -0
  79. package/src/facade/exceptions.js +6 -2
  80. package/src/facade/exceptions.js.map +1 -1
  81. package/src/facade/exceptions.metadata.json +1 -0
  82. package/src/facade/lang.d.ts +6 -4
  83. package/src/facade/lang.js +12 -11
  84. package/src/facade/lang.js.map +1 -1
  85. package/src/facade/lang.metadata.json +1 -1
  86. package/src/facade/promise.js.map +1 -1
  87. package/src/xhr/xhr_cache.js +3 -3
  88. package/src/xhr/xhr_cache.js.map +1 -1
  89. package/src/xhr/xhr_impl.js +2 -2
  90. package/src/xhr/xhr_impl.js.map +1 -1
  91. package/testing/dom_test_component_renderer.d.ts +9 -0
  92. package/testing/dom_test_component_renderer.js +38 -0
  93. package/testing/dom_test_component_renderer.js.map +1 -0
  94. package/testing/dom_test_component_renderer.metadata.json +1 -0
  95. package/testing.d.ts +9 -1
  96. package/testing.js +22 -1
  97. package/testing.js.map +1 -1
  98. package/testing.metadata.json +1 -0
  99. package/esm/platform_browser_dynamic.d.ts +0 -75
  100. package/esm/platform_browser_dynamic.js +0 -92
  101. package/esm/platform_browser_dynamic.js.map +0 -1
  102. package/esm/platform_browser_dynamic.metadata.json +0 -1
  103. package/esm/testing/browser.d.ts +0 -8
  104. package/esm/testing/browser.js +0 -13
  105. package/esm/testing/browser.js.map +0 -1
  106. package/esm/testing/browser.metadata.json +0 -1
  107. package/platform_browser_dynamic.d.ts +0 -75
  108. package/platform_browser_dynamic.js +0 -94
  109. package/platform_browser_dynamic.js.map +0 -1
  110. package/platform_browser_dynamic.metadata.json +0 -1
  111. package/testing/browser.d.ts +0 -8
  112. package/testing/browser.js +0 -14
  113. package/testing/browser.js.map +0 -1
  114. package/testing/browser.metadata.json +0 -1
@@ -1 +1 @@
1
- {"__symbolic":"module","metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"}}}
1
+ {"__symbolic":"module","version":1,"metadata":{"IS_DART":false,"Type":{"__symbolic":"reference","name":"Function"},"Math":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Math"},"Date":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Date"},"assertionsEnabled":{"__symbolic":"function","parameters":[],"value":true},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"undefined"}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isBoolean":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":8},"right":"boolean"}},"isNumber":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":8},"right":"number"}},"isString":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":131,"character":8},"right":"string"}},"isFunction":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":135,"character":8},"right":"function"}},"isType":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isFunction"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":143,"character":8},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isStringMap"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"reference","name":"STRING_MAP_PROTO"}}}},"isPromise":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"Promise"}}},"isArray":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Array"},"member":"isArray"},"arguments":[{"__symbolic":"reference","name":"obj"}]}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"serializeEnum":{"__symbolic":"function","parameters":["val"],"value":{"__symbolic":"reference","name":"val"}},"deserializeEnum":{"__symbolic":"function","parameters":["val","values"],"value":{"__symbolic":"reference","name":"val"}},"resolveEnumToken":{"__symbolic":"function","parameters":["enumValue","val"],"value":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"enumValue"},"index":{"__symbolic":"reference","name":"val"}}},"RegExp":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"RegExp"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":381,"character":19},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":381,"character":44},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"getMapKey":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"reference","name":"value"}},"normalizeBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":391,"character":8}},"normalizeBool":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"error","message":"Expression form not supported","line":395,"character":8}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":399,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":399,"character":50},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"hasConstructor":{"__symbolic":"function","parameters":["value","type"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"value"},"member":"constructor"},"right":{"__symbolic":"reference","name":"type"}}},"bitWiseOr":{"__symbolic":"function","parameters":["values"],"value":{"__symbolic":"error","message":"Function call not supported","line":492,"character":23}},"bitWiseAnd":{"__symbolic":"function","parameters":["values"],"value":{"__symbolic":"error","message":"Function call not supported","line":496,"character":23}},"escape":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"encodeURI"},"arguments":[{"__symbolic":"reference","name":"s"}]}}}}
@@ -1 +1 @@
1
- {"version":3,"file":"promise.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/src/facade/promise.ts"],"names":[],"mappings":";AAKA;IAKE;QALF,iBAWC;QALG,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,UAAC,GAAG,EAAE,GAAG;YAClC,KAAI,CAAC,OAAO,GAAG,GAAG,CAAC;YACnB,KAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,wBAAgB,mBAW5B,CAAA;AAED;IAAA;IAuCA,CAAC;IAtCQ,sBAAO,GAAd,UAAkB,GAAM,IAAgB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAE/D,qBAAM,GAAb,UAAc,GAAQ,EAAE,CAAC,IAAkB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAExE,yEAAyE;IACzE,uBAAuB;IAChB,yBAAU,GAAjB,UAAqB,OAAmB,EACnB,OAA2C;QAC9D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAEM,kBAAG,GAAV,UAAc,QAA4B;QACxC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC;YAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAEM,mBAAI,GAAX,UAAkB,OAAmB,EAAE,OAAyC,EAC9D,SAA2D;QAC3E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC1C,CAAC;IAEM,mBAAI,GAAX,UAAe,WAAoB;QACjC,MAAM,CAAC,IAAI,OAAO,CAAC,UAAC,GAAG,EAAE,GAAG;YAC1B,IAAI,CAAC;gBACH,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;YACrB,CAAE;YAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACX,GAAG,CAAC,CAAC,CAAC,CAAC;YACT,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,gCAAiB,GAAxB,UAAyB,WAAsB;QAC7C,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,UAAC,CAAC,IAAM,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEM,wBAAS,GAAhB,UAAiB,GAAQ,IAAa,MAAM,CAAC,GAAG,YAAY,OAAO,CAAC,CAAC,CAAC;IAE/D,wBAAS,GAAhB,cAA6C,MAAM,CAAC,IAAI,gBAAgB,EAAK,CAAC,CAAC,CAAC;IAClF,qBAAC;AAAD,CAAC,AAvCD,IAuCC;AAvCY,sBAAc,iBAuC1B,CAAA","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n \nexport class PromiseCompleter<R> {\n promise: Promise<R>;\n resolve: (value?: R | PromiseLike<R>) => void;\n reject: (error?: any, stackTrace?: string) => void;\n\n constructor() {\n this.promise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n}\n\nexport class PromiseWrapper {\n static resolve<T>(obj: T): Promise<T> { return Promise.resolve(obj); }\n\n static reject(obj: any, _): Promise<any> { return Promise.reject(obj); }\n\n // Note: We can't rename this method into `catch`, as this is not a valid\n // method name in Dart.\n static catchError<T>(promise: Promise<T>,\n onError: (error: any) => T | PromiseLike<T>): Promise<T> {\n return promise.catch(onError);\n }\n\n static all<T>(promises: (T | Promise<T>)[]): Promise<T[]> {\n if (promises.length == 0) return Promise.resolve([]);\n return Promise.all(promises);\n }\n\n static then<T, U>(promise: Promise<T>, success: (value: T) => U | PromiseLike<U>,\n rejection?: (error: any, stack?: any) => U | PromiseLike<U>): Promise<U> {\n return promise.then(success, rejection);\n }\n\n static wrap<T>(computation: () => T): Promise<T> {\n return new Promise((res, rej) => {\n try {\n res(computation());\n } catch (e) {\n rej(e);\n }\n });\n }\n\n static scheduleMicrotask(computation: () => any): void {\n PromiseWrapper.then(PromiseWrapper.resolve(null), computation, (_) => {});\n }\n\n static isPromise(obj: any): boolean { return obj instanceof Promise; }\n\n static completer<T>(): PromiseCompleter<T> { return new PromiseCompleter<T>(); }\n}\n"]}
1
+ {"version":3,"file":"promise.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/src/facade/promise.ts"],"names":[],"mappings":";AACA;IAKE;QALF,iBAWC;QALG,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,UAAC,GAAG,EAAE,GAAG;YAClC,KAAI,CAAC,OAAO,GAAG,GAAG,CAAC;YACnB,KAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,wBAAgB,mBAW5B,CAAA;AAED;IAAA;IAwCA,CAAC;IAvCQ,sBAAO,GAAd,UAAkB,GAAM,IAAgB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAE/D,qBAAM,GAAb,UAAc,GAAQ,EAAE,CAAM,IAAkB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAE7E,yEAAyE;IACzE,uBAAuB;IAChB,yBAAU,GAAjB,UAAqB,OAAmB,EAAE,OAA2C;QAEnF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAEM,kBAAG,GAAV,UAAc,QAA0B;QACtC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC;YAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAEM,mBAAI,GAAX,UACI,OAAmB,EAAE,OAAyC,EAC9D,SAA2D;QAC7D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC1C,CAAC;IAEM,mBAAI,GAAX,UAAe,WAAoB;QACjC,MAAM,CAAC,IAAI,OAAO,CAAC,UAAC,GAAG,EAAE,GAAG;YAC1B,IAAI,CAAC;gBACH,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;YACrB,CAAE;YAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACX,GAAG,CAAC,CAAC,CAAC,CAAC;YACT,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,gCAAiB,GAAxB,UAAyB,WAAsB;QAC7C,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,UAAC,CAAC,IAAM,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEM,wBAAS,GAAhB,UAAiB,GAAQ,IAAa,MAAM,CAAC,GAAG,YAAY,OAAO,CAAC,CAAC,CAAC;IAE/D,wBAAS,GAAhB,cAA6C,MAAM,CAAC,IAAI,gBAAgB,EAAK,CAAC,CAAC,CAAC;IAClF,qBAAC;AAAD,CAAC,AAxCD,IAwCC;AAxCY,sBAAc,iBAwC1B,CAAA","sourcesContent":["\nexport class PromiseCompleter<R> {\n promise: Promise<R>;\n resolve: (value?: R|PromiseLike<R>) => void;\n reject: (error?: any, stackTrace?: string) => void;\n\n constructor() {\n this.promise = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n }\n}\n\nexport class PromiseWrapper {\n static resolve<T>(obj: T): Promise<T> { return Promise.resolve(obj); }\n\n static reject(obj: any, _: any): Promise<any> { return Promise.reject(obj); }\n\n // Note: We can't rename this method into `catch`, as this is not a valid\n // method name in Dart.\n static catchError<T>(promise: Promise<T>, onError: (error: any) => T | PromiseLike<T>):\n Promise<T> {\n return promise.catch(onError);\n }\n\n static all<T>(promises: (T|Promise<T>)[]): Promise<T[]> {\n if (promises.length == 0) return Promise.resolve([]);\n return Promise.all(promises);\n }\n\n static then<T, U>(\n promise: Promise<T>, success: (value: T) => U | PromiseLike<U>,\n rejection?: (error: any, stack?: any) => U | PromiseLike<U>): Promise<U> {\n return promise.then(success, rejection);\n }\n\n static wrap<T>(computation: () => T): Promise<T> {\n return new Promise((res, rej) => {\n try {\n res(computation());\n } catch (e) {\n rej(e);\n }\n });\n }\n\n static scheduleMicrotask(computation: () => any): void {\n PromiseWrapper.then(PromiseWrapper.resolve(null), computation, (_) => {});\n }\n\n static isPromise(obj: any): boolean { return obj instanceof Promise; }\n\n static completer<T>(): PromiseCompleter<T> { return new PromiseCompleter<T>(); }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -5,9 +5,9 @@ var __extends = (this && this.__extends) || function (d, b) {
5
5
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6
6
  };
7
7
  var compiler_1 = require('@angular/compiler');
8
- var exceptions_1 = require('../../src/facade/exceptions');
9
- var lang_1 = require('../../src/facade/lang');
10
- var promise_1 = require('../../src/facade/promise');
8
+ var exceptions_1 = require('../facade/exceptions');
9
+ var lang_1 = require('../facade/lang');
10
+ var promise_1 = require('../facade/promise');
11
11
  /**
12
12
  * An implementation of XHR that uses a template cache to avoid doing an actual
13
13
  * XHR.
@@ -1 +1 @@
1
- {"version":3,"file":"xhr_cache.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/src/xhr/xhr_cache.ts"],"names":[],"mappings":";;;;;;AAIE,yBAAkB,mBAAmB,CAAC,CAAA;AACxC,2BAA4B,6BAA6B,CAAC,CAAA;AAC1D,qBAAqB,uBAAuB,CAAC,CAAA;AAC7C,wBAA6B,0BAA0B,CAAC,CAAA;AAExD;;;;;;GAMG;AACH;IAA+B,6BAAG;IAGhC;QACE,iBAAO,CAAC;QACR,IAAI,CAAC,MAAM,GAAS,aAAO,CAAC,cAAc,CAAC;QAC3C,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACxB,MAAM,IAAI,0BAAa,CAAC,4DAA4D,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;IAED,uBAAG,GAAH,UAAI,GAAW;QACb,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACpC,MAAM,CAAC,wBAAc,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAClD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,wBAAc,CAAC,MAAM,CAAC,8CAA8C,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;IACH,gBAAC;AAAD,CAAC,AAlBD,CAA+B,cAAG,GAkBjC;AAlBY,iBAAS,YAkBrB,CAAA","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {XHR} from '@angular/compiler';\nimport {BaseException} from '../../src/facade/exceptions';\nimport {global} from '../../src/facade/lang';\nimport {PromiseWrapper} from '../../src/facade/promise';\n\n/**\n * An implementation of XHR that uses a template cache to avoid doing an actual\n * XHR.\n *\n * The template cache needs to be built and loaded into window.$templateCache\n * via a separate mechanism.\n */\nexport class CachedXHR extends XHR {\n private _cache: {[url: string]: string};\n\n constructor() {\n super();\n this._cache = (<any>global).$templateCache;\n if (this._cache == null) {\n throw new BaseException('CachedXHR: Template cache was not found in $templateCache.');\n }\n }\n\n get(url: string): Promise<string> {\n if (this._cache.hasOwnProperty(url)) {\n return PromiseWrapper.resolve(this._cache[url]);\n } else {\n return PromiseWrapper.reject('CachedXHR: Did not find cached template for ' + url, null);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"xhr_cache.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/src/xhr/xhr_cache.ts"],"names":[],"mappings":";;;;;;AAAA,yBAAkB,mBAAmB,CAAC,CAAA;AACtC,2BAA4B,sBAAsB,CAAC,CAAA;AACnD,qBAAqB,gBAAgB,CAAC,CAAA;AACtC,wBAA6B,mBAAmB,CAAC,CAAA;AAEjD;;;;;;GAMG;AACH;IAA+B,6BAAG;IAGhC;QACE,iBAAO,CAAC;QACR,IAAI,CAAC,MAAM,GAAS,aAAO,CAAC,cAAc,CAAC;QAC3C,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACxB,MAAM,IAAI,0BAAa,CAAC,4DAA4D,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;IAED,uBAAG,GAAH,UAAI,GAAW;QACb,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACpC,MAAM,CAAC,wBAAc,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAClD,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,wBAAc,CAAC,MAAM,CAAC,8CAA8C,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;IACH,gBAAC;AAAD,CAAC,AAlBD,CAA+B,cAAG,GAkBjC;AAlBY,iBAAS,YAkBrB,CAAA","sourcesContent":["import {XHR} from '@angular/compiler';\nimport {BaseException} from '../facade/exceptions';\nimport {global} from '../facade/lang';\nimport {PromiseWrapper} from '../facade/promise';\n\n/**\n * An implementation of XHR that uses a template cache to avoid doing an actual\n * XHR.\n *\n * The template cache needs to be built and loaded into window.$templateCache\n * via a separate mechanism.\n */\nexport class CachedXHR extends XHR {\n private _cache: {[url: string]: string};\n\n constructor() {\n super();\n this._cache = (<any>global).$templateCache;\n if (this._cache == null) {\n throw new BaseException('CachedXHR: Template cache was not found in $templateCache.');\n }\n }\n\n get(url: string): Promise<string> {\n if (this._cache.hasOwnProperty(url)) {\n return PromiseWrapper.resolve(this._cache[url]);\n } else {\n return PromiseWrapper.reject('CachedXHR: Did not find cached template for ' + url, null);\n }\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -5,8 +5,8 @@ var __extends = (this && this.__extends) || function (d, b) {
5
5
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6
6
  };
7
7
  var compiler_1 = require('@angular/compiler');
8
- var promise_1 = require('../../src/facade/promise');
9
- var lang_1 = require('../../src/facade/lang');
8
+ var lang_1 = require('../facade/lang');
9
+ var promise_1 = require('../facade/promise');
10
10
  var XHRImpl = (function (_super) {
11
11
  __extends(XHRImpl, _super);
12
12
  function XHRImpl() {
@@ -1 +1 @@
1
- {"version":3,"file":"xhr_impl.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/src/xhr/xhr_impl.ts"],"names":[],"mappings":";;;;;;AAIE,yBAAkB,mBAAmB,CAAC,CAAA;AACxC,wBAA+C,0BAA0B,CAAC,CAAA;AAC1E,qBAAwB,uBAAuB,CAAC,CAAA;AAEhD;IAA6B,2BAAG;IAAhC;QAA6B,8BAAG;IAkChC,CAAC;IAjCC,qBAAG,GAAH,UAAI,GAAW;QACb,IAAI,SAAS,GAA+B,wBAAc,CAAC,SAAS,EAAE,CAAC;QACvE,IAAI,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QAC/B,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC;QAE1B,GAAG,CAAC,MAAM,GAAG;YACX,mFAAmF;YACnF,0FAA0F;YAC1F,IAAI,QAAQ,GAAG,gBAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;YAEzE,yDAAyD;YACzD,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;YAEpD,2DAA2D;YAC3D,uEAAuE;YACvE,iDAAiD;YACjD,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACjB,MAAM,GAAG,QAAQ,GAAG,GAAG,GAAG,CAAC,CAAC;YAC9B,CAAC;YAED,EAAE,CAAC,CAAC,GAAG,IAAI,MAAM,IAAI,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC;gBACnC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC9B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,SAAS,CAAC,MAAM,CAAC,oBAAkB,GAAK,EAAE,IAAI,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC;QAEF,GAAG,CAAC,OAAO,GAAG,cAAa,SAAS,CAAC,MAAM,CAAC,oBAAkB,GAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAE9E,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;IAC3B,CAAC;IACH,cAAC;AAAD,CAAC,AAlCD,CAA6B,cAAG,GAkC/B;AAlCY,eAAO,UAkCnB,CAAA","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {XHR} from '@angular/compiler';\nimport {PromiseWrapper, PromiseCompleter} from '../../src/facade/promise';\nimport {isPresent} from '../../src/facade/lang';\n\nexport class XHRImpl extends XHR {\n get(url: string): Promise<string> {\n var completer: PromiseCompleter < string >= PromiseWrapper.completer();\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.responseType = 'text';\n\n xhr.onload = function() {\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n var response = isPresent(xhr.response) ? xhr.response : xhr.responseText;\n\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = xhr.status === 1223 ? 204 : xhr.status;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : 0;\n }\n\n if (200 <= status && status <= 300) {\n completer.resolve(response);\n } else {\n completer.reject(`Failed to load ${url}`, null);\n }\n };\n\n xhr.onerror = function() { completer.reject(`Failed to load ${url}`, null); };\n\n xhr.send();\n return completer.promise;\n }\n}\n"]}
1
+ {"version":3,"file":"xhr_impl.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/src/xhr/xhr_impl.ts"],"names":[],"mappings":";;;;;;AAAA,yBAAkB,mBAAmB,CAAC,CAAA;AAEtC,qBAAwB,gBAAgB,CAAC,CAAA;AACzC,wBAA+C,mBAAmB,CAAC,CAAA;AAEnE;IAA6B,2BAAG;IAAhC;QAA6B,8BAAG;IAkChC,CAAC;IAjCC,qBAAG,GAAH,UAAI,GAAW;QACb,IAAI,SAAS,GAA6B,wBAAc,CAAC,SAAS,EAAE,CAAC;QACrE,IAAI,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QAC/B,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC;QAE1B,GAAG,CAAC,MAAM,GAAG;YACX,mFAAmF;YACnF,0FAA0F;YAC1F,IAAI,QAAQ,GAAG,gBAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;YAEzE,yDAAyD;YACzD,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;YAEpD,2DAA2D;YAC3D,uEAAuE;YACvE,iDAAiD;YACjD,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;gBACjB,MAAM,GAAG,QAAQ,GAAG,GAAG,GAAG,CAAC,CAAC;YAC9B,CAAC;YAED,EAAE,CAAC,CAAC,GAAG,IAAI,MAAM,IAAI,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC;gBACnC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC9B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,SAAS,CAAC,MAAM,CAAC,oBAAkB,GAAK,EAAE,IAAI,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC;QAEF,GAAG,CAAC,OAAO,GAAG,cAAa,SAAS,CAAC,MAAM,CAAC,oBAAkB,GAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAE9E,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;IAC3B,CAAC;IACH,cAAC;AAAD,CAAC,AAlCD,CAA6B,cAAG,GAkC/B;AAlCY,eAAO,UAkCnB,CAAA","sourcesContent":["import {XHR} from '@angular/compiler';\n\nimport {isPresent} from '../facade/lang';\nimport {PromiseCompleter, PromiseWrapper} from '../facade/promise';\n\nexport class XHRImpl extends XHR {\n get(url: string): Promise<string> {\n var completer: PromiseCompleter<string> = PromiseWrapper.completer();\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.responseType = 'text';\n\n xhr.onload = function() {\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n var response = isPresent(xhr.response) ? xhr.response : xhr.responseText;\n\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = xhr.status === 1223 ? 204 : xhr.status;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : 0;\n }\n\n if (200 <= status && status <= 300) {\n completer.resolve(response);\n } else {\n completer.reject(`Failed to load ${url}`, null);\n }\n };\n\n xhr.onerror = function() { completer.reject(`Failed to load ${url}`, null); };\n\n xhr.send();\n return completer.promise;\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import { TestComponentRenderer } from '@angular/compiler/testing';
2
+ /**
3
+ * A DOM based implementation of the TestComponentRenderer.
4
+ */
5
+ export declare class DOMTestComponentRenderer extends TestComponentRenderer {
6
+ private _doc;
7
+ constructor(_doc: any);
8
+ insertRootElement(rootElId: string): void;
9
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || function (d, b) {
3
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
4
+ function __() { this.constructor = d; }
5
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6
+ };
7
+ var testing_1 = require('@angular/compiler/testing');
8
+ var core_1 = require('@angular/core');
9
+ var platform_browser_1 = require('@angular/platform-browser');
10
+ var testing_2 = require('@angular/platform-browser/testing');
11
+ var platform_browser_private_1 = require('../platform_browser_private');
12
+ var DOMTestComponentRenderer = (function (_super) {
13
+ __extends(DOMTestComponentRenderer, _super);
14
+ function DOMTestComponentRenderer(_doc /** TODO #9100 */) {
15
+ _super.call(this);
16
+ this._doc = _doc;
17
+ }
18
+ DOMTestComponentRenderer.prototype.insertRootElement = function (rootElId) {
19
+ var rootEl = testing_2.el("<div id=\"" + rootElId + "\"></div>");
20
+ // TODO(juliemr): can/should this be optional?
21
+ var oldRoots = platform_browser_private_1.getDOM().querySelectorAll(this._doc, '[id^=root]');
22
+ for (var i = 0; i < oldRoots.length; i++) {
23
+ platform_browser_private_1.getDOM().remove(oldRoots[i]);
24
+ }
25
+ platform_browser_private_1.getDOM().appendChild(this._doc.body, rootEl);
26
+ };
27
+ /** @nocollapse */
28
+ DOMTestComponentRenderer.decorators = [
29
+ { type: core_1.Injectable },
30
+ ];
31
+ /** @nocollapse */
32
+ DOMTestComponentRenderer.ctorParameters = [
33
+ { type: undefined, decorators: [{ type: core_1.Inject, args: [platform_browser_1.DOCUMENT,] },] },
34
+ ];
35
+ return DOMTestComponentRenderer;
36
+ }(testing_1.TestComponentRenderer));
37
+ exports.DOMTestComponentRenderer = DOMTestComponentRenderer;
38
+ //# sourceMappingURL=dom_test_component_renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom_test_component_renderer.js","sourceRoot":"","sources":["../../../../modules/@angular/platform-browser-dynamic/testing/dom_test_component_renderer.ts"],"names":[],"mappings":";;;;;;AAAA,wBAAoC,2BAA2B,CAAC,CAAA;AAChE,qBAAiC,eAAe,CAAC,CAAA;AACjD,iCAAuB,2BAA2B,CAAC,CAAA;AACnD,wBAAiB,mCAAmC,CAAC,CAAA;AAErD,yCAAqB,6BAA6B,CAAC,CAAA;AACnD;IAA8C,4CAAqB;IACjE,kCAAqB,IAAS,CAAC,iBAAiB;QAAI,iBAAO,CAAC;QAAvC,SAAI,GAAJ,IAAI,CAAK;IAA+B,CAAC;IAE9D,oDAAiB,GAAjB,UAAkB,QAAgB;QAChC,IAAI,MAAM,GAAG,YAAE,CAAC,eAAY,QAAQ,cAAU,CAAC,CAAC;QAEhD,8CAA8C;QAC9C,IAAI,QAAQ,GAAG,iCAAM,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAClE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,iCAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;QACD,iCAAM,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IACH,kBAAkB;IACX,mCAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,iBAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,uCAAc,GAA2D;QAChF,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,aAAM,EAAE,IAAI,EAAE,CAAC,2BAAQ,EAAG,EAAE,EAAG,EAAC;KACtE,CAAC;IACF,+BAAC;AAAD,CAAC,AArBD,CAA8C,+BAAqB,GAqBlE;AArBY,gCAAwB,2BAqBpC,CAAA","sourcesContent":["import {TestComponentRenderer} from '@angular/compiler/testing';\nimport {Inject, Injectable} from '@angular/core';\nimport {DOCUMENT} from '@angular/platform-browser';\nimport {el} from '@angular/platform-browser/testing';\n\nimport {getDOM} from '../platform_browser_private';\nexport class DOMTestComponentRenderer extends TestComponentRenderer {\n constructor( private _doc: any /** TODO #9100 */) { super(); }\n\n insertRootElement(rootElId: string) {\n let rootEl = el(`<div id=\"${rootElId}\"></div>`);\n\n // TODO(juliemr): can/should this be optional?\n let oldRoots = getDOM().querySelectorAll(this._doc, '[id^=root]');\n for (let i = 0; i < oldRoots.length; i++) {\n getDOM().remove(oldRoots[i]);\n }\n getDOM().appendChild(this._doc.body, rootEl);\n }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n{type: undefined, decorators: [{ type: Inject, args: [DOCUMENT, ] }, ]},\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":1,"metadata":{"DOMTestComponentRenderer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}],"insertRootElement":[{"__symbolic":"method"}]}}}}
package/testing.d.ts CHANGED
@@ -1 +1,9 @@
1
- export * from './testing/browser';
1
+ export * from './private_export_testing';
2
+ /**
3
+ * Default platform providers for testing.
4
+ */
5
+ export declare const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any>;
6
+ /**
7
+ * Default application providers for testing.
8
+ */
9
+ export declare const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any>;
package/testing.js CHANGED
@@ -2,5 +2,26 @@
2
2
  function __export(m) {
3
3
  for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
4
  }
5
- __export(require('./testing/browser'));
5
+ var compiler_1 = require('@angular/compiler');
6
+ var testing_1 = require('@angular/compiler/testing');
7
+ var testing_2 = require('@angular/platform-browser/testing');
8
+ var index_1 = require('./index');
9
+ var dom_test_component_renderer_1 = require('./testing/dom_test_component_renderer');
10
+ __export(require('./private_export_testing'));
11
+ /**
12
+ * Default platform providers for testing.
13
+ */
14
+ exports.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [testing_2.TEST_BROWSER_PLATFORM_PROVIDERS];
15
+ /**
16
+ * Default application providers for testing.
17
+ */
18
+ exports.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS = [
19
+ testing_2.TEST_BROWSER_APPLICATION_PROVIDERS, index_1.BROWSER_APP_COMPILER_PROVIDERS,
20
+ [
21
+ { provide: compiler_1.DirectiveResolver, useClass: testing_1.MockDirectiveResolver },
22
+ { provide: compiler_1.ViewResolver, useClass: testing_1.MockViewResolver },
23
+ testing_1.TestComponentBuilder,
24
+ { provide: testing_1.TestComponentRenderer, useClass: dom_test_component_renderer_1.DOMTestComponentRenderer },
25
+ ]
26
+ ];
6
27
  //# sourceMappingURL=testing.js.map
package/testing.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../modules/@angular/platform-browser-dynamic/testing.ts"],"names":[],"mappings":";;;;AAIE,iBAAc,mBAAmB,CAAC,EAAA","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n export * from './testing/browser';\n"]}
1
+ {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../modules/@angular/platform-browser-dynamic/testing.ts"],"names":[],"mappings":";;;;AAAA,yBAA8C,mBAAmB,CAAC,CAAA;AAClE,wBAAmG,2BAA2B,CAAC,CAAA;AAC/H,wBAAkF,mCAAmC,CAAC,CAAA;AAEtH,sBAA6C,SAAS,CAAC,CAAA;AACvD,4CAAuC,uCAAuC,CAAC,CAAA;AAE/E,iBAAc,0BAKd,CAAC,EALuC;AAExC;;GAEG;AACU,+CAAuC,GAChD,CAAC,yCAA+B,CAAC,CAAC;AAEtC;;GAEG;AACU,kDAA0C,GAA2C;IAChG,4CAAkC,EAAE,sCAA8B;IAClE;QACE,EAAC,OAAO,EAAE,4BAAiB,EAAE,QAAQ,EAAE,+BAAqB,EAAC;QAC7D,EAAC,OAAO,EAAE,uBAAY,EAAE,QAAQ,EAAE,0BAAgB,EAAC;QACnD,8BAAoB;QACpB,EAAC,OAAO,EAAE,+BAAqB,EAAE,QAAQ,EAAE,sDAAwB,EAAC;KACrE;CACF,CAAC","sourcesContent":["import {DirectiveResolver, ViewResolver} from '@angular/compiler';\nimport {MockDirectiveResolver, MockViewResolver, TestComponentBuilder, TestComponentRenderer} from '@angular/compiler/testing';\nimport {TEST_BROWSER_APPLICATION_PROVIDERS, TEST_BROWSER_PLATFORM_PROVIDERS} from '@angular/platform-browser/testing';\n\nimport {BROWSER_APP_COMPILER_PROVIDERS} from './index';\nimport {DOMTestComponentRenderer} from './testing/dom_test_component_renderer';\n\nexport * from './private_export_testing'\n\n/**\n * Default platform providers for testing.\n */\nexport const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> =\n [TEST_BROWSER_PLATFORM_PROVIDERS];\n\n/**\n * Default application providers for testing.\n */\nexport const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> = [\n TEST_BROWSER_APPLICATION_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS,\n [\n {provide: DirectiveResolver, useClass: MockDirectiveResolver},\n {provide: ViewResolver, useClass: MockViewResolver},\n TestComponentBuilder,\n {provide: TestComponentRenderer, useClass: DOMTestComponentRenderer},\n ]\n];\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":1,"metadata":{"TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"TEST_BROWSER_PLATFORM_PROVIDERS"}],"TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS":[{"__symbolic":"reference","module":"@angular/platform-browser/testing","name":"TEST_BROWSER_APPLICATION_PROVIDERS"},{"__symbolic":"reference","module":"./index","name":"BROWSER_APP_COMPILER_PROVIDERS"},[{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"DirectiveResolver"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"MockDirectiveResolver"}},{"provide":{"__symbolic":"reference","module":"@angular/compiler","name":"ViewResolver"},"useClass":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"MockViewResolver"}},{"__symbolic":"reference","module":"@angular/compiler/testing","name":"TestComponentBuilder"},{"provide":{"__symbolic":"reference","module":"@angular/compiler/testing","name":"TestComponentRenderer"},"useClass":{"__symbolic":"reference","module":"./testing/dom_test_component_renderer","name":"DOMTestComponentRenderer"}}]]}}
@@ -1,75 +0,0 @@
1
- import { Type, ComponentRef } from '@angular/core';
2
- export declare const CACHED_TEMPLATE_PROVIDER: Array<any>;
3
- /**
4
- * An array of providers that should be passed into `application()` when bootstrapping a component.
5
- */
6
- export declare const BROWSER_APP_DYNAMIC_PROVIDERS: Array<any>;
7
- /**
8
- * Bootstrapping for Angular applications.
9
- *
10
- * You instantiate an Angular application by explicitly specifying a component to use
11
- * as the root component for your application via the `bootstrap()` method.
12
- *
13
- * ## Simple Example
14
- *
15
- * Assuming this `index.html`:
16
- *
17
- * ```html
18
- * <html>
19
- * <!-- load Angular script tags here. -->
20
- * <body>
21
- * <my-app>loading...</my-app>
22
- * </body>
23
- * </html>
24
- * ```
25
- *
26
- * An application is bootstrapped inside an existing browser DOM, typically `index.html`.
27
- * Unlike Angular 1, Angular 2 does not compile/process providers in `index.html`. This is
28
- * mainly for security reasons, as well as architectural changes in Angular 2. This means
29
- * that `index.html` can safely be processed using server-side technologies such as
30
- * providers. Bindings can thus use double-curly `{{ syntax }}` without collision from
31
- * Angular 2 component double-curly `{{ syntax }}`.
32
- *
33
- * We can use this script code:
34
- *
35
- * {@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}
36
- *
37
- * When the app developer invokes `bootstrap()` with the root component `MyApp` as its
38
- * argument, Angular performs the following tasks:
39
- *
40
- * 1. It uses the component's `selector` property to locate the DOM element which needs
41
- * to be upgraded into the angular component.
42
- * 2. It creates a new child injector (from the platform injector). Optionally, you can
43
- * also override the injector configuration for an app by invoking `bootstrap` with the
44
- * `componentInjectableBindings` argument.
45
- * 3. It creates a new `Zone` and connects it to the angular application's change detection
46
- * domain instance.
47
- * 4. It creates an emulated or shadow DOM on the selected component's host element and loads the
48
- * template into it.
49
- * 5. It instantiates the specified component.
50
- * 6. Finally, Angular performs change detection to apply the initial data providers for the
51
- * application.
52
- *
53
- *
54
- * ## Bootstrapping Multiple Applications
55
- *
56
- * When working within a browser window, there are many singleton resources: cookies, title,
57
- * location, and others. Angular services that represent these resources must likewise be
58
- * shared across all Angular applications that occupy the same browser window. For this
59
- * reason, Angular creates exactly one global platform object which stores all shared
60
- * services, and each angular application injector has the platform injector as its parent.
61
- *
62
- * Each application has its own private injector as well. When there are multiple
63
- * applications on a page, Angular treats each application injector's services as private
64
- * to that application.
65
- *
66
- * ## API
67
- *
68
- * - `appComponentType`: The root component which should act as the application. This is
69
- * a reference to a `Type` which is annotated with `@Component(...)`.
70
- * - `customProviders`: An additional set of providers that can be added to the
71
- * app injector to override default injection behavior.
72
- *
73
- * Returns a `Promise` of {@link ComponentRef}.
74
- */
75
- export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
@@ -1,92 +0,0 @@
1
- import { COMPILER_PROVIDERS, XHR } from '@angular/compiler';
2
- import { CachedXHR } from './src/xhr/xhr_cache';
3
- import { isPresent } from './src/facade/lang';
4
- import { XHRImpl } from './src/xhr/xhr_impl';
5
- import { BROWSER_APP_COMMON_PROVIDERS, browserPlatform } from '@angular/platform-browser';
6
- import { reflector, ReflectiveInjector, coreLoadAndBootstrap } from '@angular/core';
7
- import { ReflectionCapabilities } from './core_private';
8
- export const CACHED_TEMPLATE_PROVIDER =
9
- /*@ts2dart_const*/ [{ provide: XHR, useClass: CachedXHR }];
10
- /**
11
- * An array of providers that should be passed into `application()` when bootstrapping a component.
12
- */
13
- export const BROWSER_APP_DYNAMIC_PROVIDERS =
14
- /*@ts2dart_const*/ [
15
- BROWSER_APP_COMMON_PROVIDERS,
16
- COMPILER_PROVIDERS,
17
- { provide: XHR, useClass: XHRImpl },
18
- ];
19
- /**
20
- * Bootstrapping for Angular applications.
21
- *
22
- * You instantiate an Angular application by explicitly specifying a component to use
23
- * as the root component for your application via the `bootstrap()` method.
24
- *
25
- * ## Simple Example
26
- *
27
- * Assuming this `index.html`:
28
- *
29
- * ```html
30
- * <html>
31
- * <!-- load Angular script tags here. -->
32
- * <body>
33
- * <my-app>loading...</my-app>
34
- * </body>
35
- * </html>
36
- * ```
37
- *
38
- * An application is bootstrapped inside an existing browser DOM, typically `index.html`.
39
- * Unlike Angular 1, Angular 2 does not compile/process providers in `index.html`. This is
40
- * mainly for security reasons, as well as architectural changes in Angular 2. This means
41
- * that `index.html` can safely be processed using server-side technologies such as
42
- * providers. Bindings can thus use double-curly `{{ syntax }}` without collision from
43
- * Angular 2 component double-curly `{{ syntax }}`.
44
- *
45
- * We can use this script code:
46
- *
47
- * {@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}
48
- *
49
- * When the app developer invokes `bootstrap()` with the root component `MyApp` as its
50
- * argument, Angular performs the following tasks:
51
- *
52
- * 1. It uses the component's `selector` property to locate the DOM element which needs
53
- * to be upgraded into the angular component.
54
- * 2. It creates a new child injector (from the platform injector). Optionally, you can
55
- * also override the injector configuration for an app by invoking `bootstrap` with the
56
- * `componentInjectableBindings` argument.
57
- * 3. It creates a new `Zone` and connects it to the angular application's change detection
58
- * domain instance.
59
- * 4. It creates an emulated or shadow DOM on the selected component's host element and loads the
60
- * template into it.
61
- * 5. It instantiates the specified component.
62
- * 6. Finally, Angular performs change detection to apply the initial data providers for the
63
- * application.
64
- *
65
- *
66
- * ## Bootstrapping Multiple Applications
67
- *
68
- * When working within a browser window, there are many singleton resources: cookies, title,
69
- * location, and others. Angular services that represent these resources must likewise be
70
- * shared across all Angular applications that occupy the same browser window. For this
71
- * reason, Angular creates exactly one global platform object which stores all shared
72
- * services, and each angular application injector has the platform injector as its parent.
73
- *
74
- * Each application has its own private injector as well. When there are multiple
75
- * applications on a page, Angular treats each application injector's services as private
76
- * to that application.
77
- *
78
- * ## API
79
- *
80
- * - `appComponentType`: The root component which should act as the application. This is
81
- * a reference to a `Type` which is annotated with `@Component(...)`.
82
- * - `customProviders`: An additional set of providers that can be added to the
83
- * app injector to override default injection behavior.
84
- *
85
- * Returns a `Promise` of {@link ComponentRef}.
86
- */
87
- export function bootstrap(appComponentType, customProviders) {
88
- reflector.reflectionCapabilities = new ReflectionCapabilities();
89
- var appInjector = ReflectiveInjector.resolveAndCreate([BROWSER_APP_DYNAMIC_PROVIDERS, isPresent(customProviders) ? customProviders : []], browserPlatform().injector);
90
- return coreLoadAndBootstrap(appInjector, appComponentType);
91
- }
92
- //# sourceMappingURL=platform_browser_dynamic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform_browser_dynamic.js","sourceRoot":"","sources":["../../../../modules/@angular/platform-browser-dynamic/platform_browser_dynamic.ts"],"names":[],"mappings":"OAIS,EAAC,kBAAkB,EAAE,GAAG,EAAC,MAAM,mBAAmB;OACpD,EAAC,SAAS,EAAC,MAAM,qBAAqB;OAEtC,EAAC,SAAS,EAAC,MAAM,mBAAmB;OACpC,EAAC,OAAO,EAAC,MAAM,oBAAoB;OACnC,EAAC,4BAA4B,EAAE,eAAe,EAAC,MAAM,2BAA2B;OAChF,EAAC,SAAS,EAAE,kBAAkB,EAAE,oBAAoB,EAAC,MAAM,eAAe;OAE1E,EAAC,sBAAsB,EAAC,MAAM,gBAAgB;AAErD,OAAO,MAAM,wBAAwB;AACjC,kBAAkB,CAAA,CAAC,EAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,CAAC,CAAC;AAE5D;;GAEG;AACH,OAAO,MAAM,6BAA6B;AACtC,kBAAkB,CAAA;IAChB,4BAA4B;IAC5B,kBAAkB;IAClB,EAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAC;CAClC,CAAC;AAIN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,0BACI,gBAAsB,EACtB,eAAwD;IAC1D,SAAS,CAAC,sBAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAC;IAChE,IAAI,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CACjD,CAAC,6BAA6B,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,eAAe,GAAG,EAAE,CAAC,EAClF,eAAe,EAAE,CAAC,QAAQ,CAAC,CAAC;IAChC,MAAM,CAAC,oBAAoB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {COMPILER_PROVIDERS, XHR} from '@angular/compiler';\nimport {CachedXHR} from './src/xhr/xhr_cache';\nimport {Provider, Type, ComponentRef} from '@angular/core';\nimport {isPresent} from './src/facade/lang';\nimport {XHRImpl} from './src/xhr/xhr_impl';\nimport {BROWSER_APP_COMMON_PROVIDERS, browserPlatform} from '@angular/platform-browser';\nimport {reflector, ReflectiveInjector, coreLoadAndBootstrap} from '@angular/core';\nimport {getDOM} from './platform_browser_private';\nimport {ReflectionCapabilities} from './core_private';\n\nexport const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> =\n /*@ts2dart_const*/[{provide: XHR, useClass: CachedXHR}];\n\n/**\n * An array of providers that should be passed into `application()` when bootstrapping a component.\n */\nexport const BROWSER_APP_DYNAMIC_PROVIDERS: Array<any /*Type | Provider | any[]*/> =\n /*@ts2dart_const*/[\n BROWSER_APP_COMMON_PROVIDERS,\n COMPILER_PROVIDERS,\n {provide: XHR, useClass: XHRImpl},\n ];\n\n\n\n/**\n * Bootstrapping for Angular applications.\n *\n * You instantiate an Angular application by explicitly specifying a component to use\n * as the root component for your application via the `bootstrap()` method.\n *\n * ## Simple Example\n *\n * Assuming this `index.html`:\n *\n * ```html\n * <html>\n * <!-- load Angular script tags here. -->\n * <body>\n * <my-app>loading...</my-app>\n * </body>\n * </html>\n * ```\n *\n * An application is bootstrapped inside an existing browser DOM, typically `index.html`.\n * Unlike Angular 1, Angular 2 does not compile/process providers in `index.html`. This is\n * mainly for security reasons, as well as architectural changes in Angular 2. This means\n * that `index.html` can safely be processed using server-side technologies such as\n * providers. Bindings can thus use double-curly `{{ syntax }}` without collision from\n * Angular 2 component double-curly `{{ syntax }}`.\n *\n * We can use this script code:\n *\n * {@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}\n *\n * When the app developer invokes `bootstrap()` with the root component `MyApp` as its\n * argument, Angular performs the following tasks:\n *\n * 1. It uses the component's `selector` property to locate the DOM element which needs\n * to be upgraded into the angular component.\n * 2. It creates a new child injector (from the platform injector). Optionally, you can\n * also override the injector configuration for an app by invoking `bootstrap` with the\n * `componentInjectableBindings` argument.\n * 3. It creates a new `Zone` and connects it to the angular application's change detection\n * domain instance.\n * 4. It creates an emulated or shadow DOM on the selected component's host element and loads the\n * template into it.\n * 5. It instantiates the specified component.\n * 6. Finally, Angular performs change detection to apply the initial data providers for the\n * application.\n *\n *\n * ## Bootstrapping Multiple Applications\n *\n * When working within a browser window, there are many singleton resources: cookies, title,\n * location, and others. Angular services that represent these resources must likewise be\n * shared across all Angular applications that occupy the same browser window. For this\n * reason, Angular creates exactly one global platform object which stores all shared\n * services, and each angular application injector has the platform injector as its parent.\n *\n * Each application has its own private injector as well. When there are multiple\n * applications on a page, Angular treats each application injector's services as private\n * to that application.\n *\n * ## API\n *\n * - `appComponentType`: The root component which should act as the application. This is\n * a reference to a `Type` which is annotated with `@Component(...)`.\n * - `customProviders`: An additional set of providers that can be added to the\n * app injector to override default injection behavior.\n *\n * Returns a `Promise` of {@link ComponentRef}.\n */\nexport function bootstrap(\n appComponentType: Type,\n customProviders?: Array<any /*Type | Provider | any[]*/>): Promise<ComponentRef<any>> {\n reflector.reflectionCapabilities = new ReflectionCapabilities();\n var appInjector = ReflectiveInjector.resolveAndCreate(\n [BROWSER_APP_DYNAMIC_PROVIDERS, isPresent(customProviders) ? customProviders : []],\n browserPlatform().injector);\n return coreLoadAndBootstrap(appInjector, appComponentType);\n}\n"]}
@@ -1 +0,0 @@
1
- {"__symbolic":"module","metadata":{"CACHED_TEMPLATE_PROVIDER":[{"provide":{"__symbolic":"reference","name":"XHR","module":"@angular/compiler"},"useClass":{"__symbolic":"reference","name":"CachedXHR","module":"./src/xhr/xhr_cache"}}],"BROWSER_APP_DYNAMIC_PROVIDERS":[{"__symbolic":"reference","name":"BROWSER_APP_COMMON_PROVIDERS","module":"@angular/platform-browser"},{"__symbolic":"reference","name":"COMPILER_PROVIDERS","module":"@angular/compiler"},{"provide":{"__symbolic":"reference","name":"XHR","module":"@angular/compiler"},"useClass":{"__symbolic":"reference","name":"XHRImpl","module":"./src/xhr/xhr_impl"}}]}}
@@ -1,8 +0,0 @@
1
- /**
2
- * Default platform providers for testing.
3
- */
4
- export declare const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any>;
5
- /**
6
- * Default application providers for testing.
7
- */
8
- export declare const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any>;
@@ -1,13 +0,0 @@
1
- import { TEST_BROWSER_STATIC_PLATFORM_PROVIDERS, ADDITIONAL_TEST_BROWSER_PROVIDERS } from '@angular/platform-browser/testing';
2
- import { BROWSER_APP_DYNAMIC_PROVIDERS } from '../index';
3
- /**
4
- * Default platform providers for testing.
5
- */
6
- export const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS =
7
- /*@ts2dart_const*/ [TEST_BROWSER_STATIC_PLATFORM_PROVIDERS];
8
- /**
9
- * Default application providers for testing.
10
- */
11
- export const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS =
12
- /*@ts2dart_const*/ [BROWSER_APP_DYNAMIC_PROVIDERS, ADDITIONAL_TEST_BROWSER_PROVIDERS];
13
- //# sourceMappingURL=browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../../../modules/@angular/platform-browser-dynamic/testing/browser.ts"],"names":[],"mappings":"OAIS,EACP,sCAAsC,EACtC,iCAAiC,EAClC,MAAM,mCAAmC;OACnC,EAAC,6BAA6B,EAAC,MAAM,UAAU;AAGtD;;GAEG;AACH,OAAO,MAAM,uCAAuC;AAChD,kBAAkB,CAAA,CAAC,sCAAsC,CAAC,CAAC;AAE/D;;GAEG;AACH,OAAO,MAAM,0CAA0C;AACnD,kBAAkB,CAAA,CAAC,6BAA6B,EAAE,iCAAiC,CAAC,CAAC","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {\n TEST_BROWSER_STATIC_PLATFORM_PROVIDERS,\n ADDITIONAL_TEST_BROWSER_PROVIDERS\n} from '@angular/platform-browser/testing';\nimport {BROWSER_APP_DYNAMIC_PROVIDERS} from '../index';\n\n\n/**\n * Default platform providers for testing.\n */\nexport const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]*/> =\n /*@ts2dart_const*/[TEST_BROWSER_STATIC_PLATFORM_PROVIDERS];\n\n/**\n * Default application providers for testing.\n */\nexport const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array<any /*Type | Provider | any[]*/> =\n /*@ts2dart_const*/[BROWSER_APP_DYNAMIC_PROVIDERS, ADDITIONAL_TEST_BROWSER_PROVIDERS];\n"]}
@@ -1 +0,0 @@
1
- {"__symbolic":"module","metadata":{"TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS":[{"__symbolic":"reference","name":"TEST_BROWSER_STATIC_PLATFORM_PROVIDERS","module":"@angular/platform-browser/testing"}],"TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS":[{"__symbolic":"reference","name":"BROWSER_APP_DYNAMIC_PROVIDERS","module":"../index"},{"__symbolic":"reference","name":"ADDITIONAL_TEST_BROWSER_PROVIDERS","module":"@angular/platform-browser/testing"}]}}
@@ -1,75 +0,0 @@
1
- import { Type, ComponentRef } from '@angular/core';
2
- export declare const CACHED_TEMPLATE_PROVIDER: Array<any>;
3
- /**
4
- * An array of providers that should be passed into `application()` when bootstrapping a component.
5
- */
6
- export declare const BROWSER_APP_DYNAMIC_PROVIDERS: Array<any>;
7
- /**
8
- * Bootstrapping for Angular applications.
9
- *
10
- * You instantiate an Angular application by explicitly specifying a component to use
11
- * as the root component for your application via the `bootstrap()` method.
12
- *
13
- * ## Simple Example
14
- *
15
- * Assuming this `index.html`:
16
- *
17
- * ```html
18
- * <html>
19
- * <!-- load Angular script tags here. -->
20
- * <body>
21
- * <my-app>loading...</my-app>
22
- * </body>
23
- * </html>
24
- * ```
25
- *
26
- * An application is bootstrapped inside an existing browser DOM, typically `index.html`.
27
- * Unlike Angular 1, Angular 2 does not compile/process providers in `index.html`. This is
28
- * mainly for security reasons, as well as architectural changes in Angular 2. This means
29
- * that `index.html` can safely be processed using server-side technologies such as
30
- * providers. Bindings can thus use double-curly `{{ syntax }}` without collision from
31
- * Angular 2 component double-curly `{{ syntax }}`.
32
- *
33
- * We can use this script code:
34
- *
35
- * {@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}
36
- *
37
- * When the app developer invokes `bootstrap()` with the root component `MyApp` as its
38
- * argument, Angular performs the following tasks:
39
- *
40
- * 1. It uses the component's `selector` property to locate the DOM element which needs
41
- * to be upgraded into the angular component.
42
- * 2. It creates a new child injector (from the platform injector). Optionally, you can
43
- * also override the injector configuration for an app by invoking `bootstrap` with the
44
- * `componentInjectableBindings` argument.
45
- * 3. It creates a new `Zone` and connects it to the angular application's change detection
46
- * domain instance.
47
- * 4. It creates an emulated or shadow DOM on the selected component's host element and loads the
48
- * template into it.
49
- * 5. It instantiates the specified component.
50
- * 6. Finally, Angular performs change detection to apply the initial data providers for the
51
- * application.
52
- *
53
- *
54
- * ## Bootstrapping Multiple Applications
55
- *
56
- * When working within a browser window, there are many singleton resources: cookies, title,
57
- * location, and others. Angular services that represent these resources must likewise be
58
- * shared across all Angular applications that occupy the same browser window. For this
59
- * reason, Angular creates exactly one global platform object which stores all shared
60
- * services, and each angular application injector has the platform injector as its parent.
61
- *
62
- * Each application has its own private injector as well. When there are multiple
63
- * applications on a page, Angular treats each application injector's services as private
64
- * to that application.
65
- *
66
- * ## API
67
- *
68
- * - `appComponentType`: The root component which should act as the application. This is
69
- * a reference to a `Type` which is annotated with `@Component(...)`.
70
- * - `customProviders`: An additional set of providers that can be added to the
71
- * app injector to override default injection behavior.
72
- *
73
- * Returns a `Promise` of {@link ComponentRef}.
74
- */
75
- export declare function bootstrap(appComponentType: Type, customProviders?: Array<any>): Promise<ComponentRef<any>>;
@@ -1,94 +0,0 @@
1
- "use strict";
2
- var compiler_1 = require('@angular/compiler');
3
- var xhr_cache_1 = require('./src/xhr/xhr_cache');
4
- var lang_1 = require('./src/facade/lang');
5
- var xhr_impl_1 = require('./src/xhr/xhr_impl');
6
- var platform_browser_1 = require('@angular/platform-browser');
7
- var core_1 = require('@angular/core');
8
- var core_private_1 = require('./core_private');
9
- exports.CACHED_TEMPLATE_PROVIDER =
10
- /*@ts2dart_const*/ [{ provide: compiler_1.XHR, useClass: xhr_cache_1.CachedXHR }];
11
- /**
12
- * An array of providers that should be passed into `application()` when bootstrapping a component.
13
- */
14
- exports.BROWSER_APP_DYNAMIC_PROVIDERS =
15
- /*@ts2dart_const*/ [
16
- platform_browser_1.BROWSER_APP_COMMON_PROVIDERS,
17
- compiler_1.COMPILER_PROVIDERS,
18
- { provide: compiler_1.XHR, useClass: xhr_impl_1.XHRImpl },
19
- ];
20
- /**
21
- * Bootstrapping for Angular applications.
22
- *
23
- * You instantiate an Angular application by explicitly specifying a component to use
24
- * as the root component for your application via the `bootstrap()` method.
25
- *
26
- * ## Simple Example
27
- *
28
- * Assuming this `index.html`:
29
- *
30
- * ```html
31
- * <html>
32
- * <!-- load Angular script tags here. -->
33
- * <body>
34
- * <my-app>loading...</my-app>
35
- * </body>
36
- * </html>
37
- * ```
38
- *
39
- * An application is bootstrapped inside an existing browser DOM, typically `index.html`.
40
- * Unlike Angular 1, Angular 2 does not compile/process providers in `index.html`. This is
41
- * mainly for security reasons, as well as architectural changes in Angular 2. This means
42
- * that `index.html` can safely be processed using server-side technologies such as
43
- * providers. Bindings can thus use double-curly `{{ syntax }}` without collision from
44
- * Angular 2 component double-curly `{{ syntax }}`.
45
- *
46
- * We can use this script code:
47
- *
48
- * {@example core/ts/bootstrap/bootstrap.ts region='bootstrap'}
49
- *
50
- * When the app developer invokes `bootstrap()` with the root component `MyApp` as its
51
- * argument, Angular performs the following tasks:
52
- *
53
- * 1. It uses the component's `selector` property to locate the DOM element which needs
54
- * to be upgraded into the angular component.
55
- * 2. It creates a new child injector (from the platform injector). Optionally, you can
56
- * also override the injector configuration for an app by invoking `bootstrap` with the
57
- * `componentInjectableBindings` argument.
58
- * 3. It creates a new `Zone` and connects it to the angular application's change detection
59
- * domain instance.
60
- * 4. It creates an emulated or shadow DOM on the selected component's host element and loads the
61
- * template into it.
62
- * 5. It instantiates the specified component.
63
- * 6. Finally, Angular performs change detection to apply the initial data providers for the
64
- * application.
65
- *
66
- *
67
- * ## Bootstrapping Multiple Applications
68
- *
69
- * When working within a browser window, there are many singleton resources: cookies, title,
70
- * location, and others. Angular services that represent these resources must likewise be
71
- * shared across all Angular applications that occupy the same browser window. For this
72
- * reason, Angular creates exactly one global platform object which stores all shared
73
- * services, and each angular application injector has the platform injector as its parent.
74
- *
75
- * Each application has its own private injector as well. When there are multiple
76
- * applications on a page, Angular treats each application injector's services as private
77
- * to that application.
78
- *
79
- * ## API
80
- *
81
- * - `appComponentType`: The root component which should act as the application. This is
82
- * a reference to a `Type` which is annotated with `@Component(...)`.
83
- * - `customProviders`: An additional set of providers that can be added to the
84
- * app injector to override default injection behavior.
85
- *
86
- * Returns a `Promise` of {@link ComponentRef}.
87
- */
88
- function bootstrap(appComponentType, customProviders) {
89
- core_1.reflector.reflectionCapabilities = new core_private_1.ReflectionCapabilities();
90
- var appInjector = core_1.ReflectiveInjector.resolveAndCreate([exports.BROWSER_APP_DYNAMIC_PROVIDERS, lang_1.isPresent(customProviders) ? customProviders : []], platform_browser_1.browserPlatform().injector);
91
- return core_1.coreLoadAndBootstrap(appInjector, appComponentType);
92
- }
93
- exports.bootstrap = bootstrap;
94
- //# sourceMappingURL=platform_browser_dynamic.js.map