a zip code crypto-currency system good for red ONLY

ng-module-loader.js 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. (function (factory) {
  2. if (typeof module === "object" && typeof module.exports === "object") {
  3. var v = factory(require, exports);
  4. if (v !== undefined) module.exports = v;
  5. }
  6. else if (typeof define === "function" && define.amd) {
  7. define(["require", "exports", "@angular/core"], factory);
  8. }
  9. })(function (require, exports) {
  10. "use strict";
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. /**
  14. * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
  15. */
  16. var NgModuleLoader = (function () {
  17. function NgModuleLoader(_compiler) {
  18. this._compiler = _compiler;
  19. }
  20. NgModuleLoader.prototype.load = function (modulePath, ngModuleExport) {
  21. var offlineMode = this._compiler instanceof core_1.Compiler;
  22. return offlineMode ? loadPrecompiledFactory(modulePath, ngModuleExport) : loadAndCompile(this._compiler, modulePath, ngModuleExport);
  23. };
  24. NgModuleLoader.decorators = [
  25. { type: core_1.Injectable },
  26. ];
  27. /** @nocollapse */
  28. NgModuleLoader.ctorParameters = function () { return [
  29. { type: core_1.Compiler, },
  30. ]; };
  31. return NgModuleLoader;
  32. }());
  33. exports.NgModuleLoader = NgModuleLoader;
  34. function loadAndCompile(compiler, modulePath, ngModuleExport) {
  35. if (!ngModuleExport) {
  36. ngModuleExport = 'default';
  37. }
  38. return System.import(modulePath)
  39. .then(function (rawModule) {
  40. var module = rawModule[ngModuleExport];
  41. if (!module) {
  42. throw new Error("Module " + modulePath + " does not export " + ngModuleExport);
  43. }
  44. return compiler.compileModuleAsync(module);
  45. });
  46. }
  47. function loadPrecompiledFactory(modulePath, ngModuleExport) {
  48. return System.import(modulePath)
  49. .then(function (rawModule) {
  50. var ngModuleFactory = rawModule[ngModuleExport];
  51. if (!ngModuleFactory) {
  52. throw new Error("Module " + modulePath + " does not export " + ngModuleExport);
  53. }
  54. return ngModuleFactory;
  55. });
  56. }
  57. });
  58. //# sourceMappingURL=ng-module-loader.js.map