Guest User

Untitled

a guest
Mar 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('highcharts'), require('@angular/common')) :
  3. typeof define === 'function' && define.amd ? define(['exports', '@angular/core', 'highcharts', '@angular/common'], factory) :
  4. (factory((global['my-component-library'] = {}),global.ng.core,global.highcharts,global.ng.common));
  5. }(this, (function (exports,core,highcharts,common) { 'use strict';
  6.  
  7. var TestService = /** @class */ (function () {
  8. function TestService() {
  9. }
  10. TestService.prototype.getMyName = function () {
  11. return "TestService";
  12. };
  13. return TestService;
  14. }());
  15. TestService.decorators = [
  16. { type: core.Injectable },
  17. ];
  18. TestService.ctorParameters = function () { return []; };
  19. var HeaderComponent = /** @class */ (function () {
  20. function HeaderComponent(testService) {
  21. this.testService = testService;
  22. }
  23. HeaderComponent.prototype.ngOnInit = function () {
  24. console.log("calling test service", this.testService.getMyName());
  25. var myChart = highcharts.chart('container', {
  26. chart: {
  27. type: 'bar'
  28. },
  29. title: {
  30. text: this.testService.getMyName()
  31. },
  32. xAxis: {
  33. categories: ['Apples', 'Bananas', 'Oranges']
  34. },
  35. yAxis: {
  36. title: {
  37. text: 'Fruit eaten'
  38. }
  39. },
  40. series: [{
  41. name: 'Jane',
  42. data: [1, 0, 4]
  43. }, {
  44. name: 'John',
  45. data: [5, 7, 3]
  46. }]
  47. });
  48. };
  49. return HeaderComponent;
  50. }());
  51. HeaderComponent.decorators = [
  52. { type: core.Component, args: [{
  53. selector: 'app-header',
  54. template: "<h1>\n My Header\n</h1>\n<div id=\"container\" style=\"width:100%; height:400px;\"></div>\n",
  55. styles: ["h1{color:red}"]
  56. },] },
  57. ];
  58. HeaderComponent.ctorParameters = function () { return [
  59. { type: TestService, },
  60. ]; };
  61. var HeaderModule = /** @class */ (function () {
  62. function HeaderModule() {
  63. this.components = [HeaderComponent];
  64. }
  65. return HeaderModule;
  66. }());
  67. HeaderModule.decorators = [
  68. { type: core.NgModule, args: [{
  69. imports: [
  70. common.CommonModule
  71. ],
  72. declarations: [
  73. HeaderComponent
  74. ],
  75. providers: [
  76. TestService
  77. ],
  78. entryComponents: [
  79. HeaderComponent
  80. ],
  81. exports: [
  82. HeaderComponent
  83. ]
  84. },] },
  85. ];
  86. HeaderModule.ctorParameters = function () { return []; };
  87.  
  88. exports.HeaderModule = HeaderModule;
  89. exports.ɵa = HeaderComponent;
  90. exports.ɵb = TestService;
  91.  
  92. Object.defineProperty(exports, '__esModule', { value: true });
  93.  
  94. })));
  95. //# sourceMappingURL=my-component-library.umd.js.map
Add Comment
Please, Sign In to add comment