Migrate from window.console to LogService

This commit is contained in:
Denys Vuika
2017-01-05 21:06:30 +00:00
parent 2d98a04f87
commit d42f41ec00
106 changed files with 1177 additions and 1171 deletions

View File

@@ -16,7 +16,7 @@
*/
import { Component, ElementRef, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
import { DiagramsService } from '../services/diagrams.service';
import { DiagramColorService } from '../services/diagram-color.service';
import { RaphaelService } from './raphael/raphael.service';
@@ -57,17 +57,16 @@ export class DiagramComponent {
PADDING_HEIGHT: number = 60;
private diagram: DiagramModel;
private elementRef: ElementRef;
constructor(elementRef: ElementRef,
constructor(private elementRef: ElementRef,
private translateService: AlfrescoTranslateService,
private diagramColorService: DiagramColorService,
private raphaelService: RaphaelService,
private diagramsService: DiagramsService) {
private diagramsService: DiagramsService,
private logService: LogService) {
if (translateService) {
translateService.addTranslationFolder('ng2-activiti-diagrams', 'node_modules/ng2-activiti-diagrams/src');
}
this.elementRef = elementRef;
}
ngOnChanges(changes: SimpleChanges) {
@@ -86,7 +85,7 @@ export class DiagramComponent {
},
(err: any) => {
this.onError.emit(err);
console.log(err);
this.logService.error(err);
}
);
}