Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('highcharts'), require('@angular/common')) :
- typeof define === 'function' && define.amd ? define(['exports', '@angular/core', 'highcharts', '@angular/common'], factory) :
- (factory((global['my-component-library'] = {}),global.ng.core,global.highcharts,global.ng.common));
- }(this, (function (exports,core,highcharts,common) { 'use strict';
- var TestService = /** @class */ (function () {
- function TestService() {
- }
- TestService.prototype.getMyName = function () {
- return "TestService";
- };
- return TestService;
- }());
- TestService.decorators = [
- { type: core.Injectable },
- ];
- TestService.ctorParameters = function () { return []; };
- var HeaderComponent = /** @class */ (function () {
- function HeaderComponent(testService) {
- this.testService = testService;
- }
- HeaderComponent.prototype.ngOnInit = function () {
- console.log("calling test service", this.testService.getMyName());
- var myChart = highcharts.chart('container', {
- chart: {
- type: 'bar'
- },
- title: {
- text: this.testService.getMyName()
- },
- xAxis: {
- categories: ['Apples', 'Bananas', 'Oranges']
- },
- yAxis: {
- title: {
- text: 'Fruit eaten'
- }
- },
- series: [{
- name: 'Jane',
- data: [1, 0, 4]
- }, {
- name: 'John',
- data: [5, 7, 3]
- }]
- });
- };
- return HeaderComponent;
- }());
- HeaderComponent.decorators = [
- { type: core.Component, args: [{
- selector: 'app-header',
- template: "<h1>\n My Header\n</h1>\n<div id=\"container\" style=\"width:100%; height:400px;\"></div>\n",
- styles: ["h1{color:red}"]
- },] },
- ];
- HeaderComponent.ctorParameters = function () { return [
- { type: TestService, },
- ]; };
- var HeaderModule = /** @class */ (function () {
- function HeaderModule() {
- this.components = [HeaderComponent];
- }
- return HeaderModule;
- }());
- HeaderModule.decorators = [
- { type: core.NgModule, args: [{
- imports: [
- common.CommonModule
- ],
- declarations: [
- HeaderComponent
- ],
- providers: [
- TestService
- ],
- entryComponents: [
- HeaderComponent
- ],
- exports: [
- HeaderComponent
- ]
- },] },
- ];
- HeaderModule.ctorParameters = function () { return []; };
- exports.HeaderModule = HeaderModule;
- exports.ɵa = HeaderComponent;
- exports.ɵb = TestService;
- Object.defineProperty(exports, '__esModule', { value: true });
- })));
- //# sourceMappingURL=my-component-library.umd.js.map
Add Comment
Please, Sign In to add comment