mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Migrate from window.console to LogService
This commit is contained in:
@@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user