mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Migrate from window.console to LogService
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { AlfrescoApiService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||
|
||||
/**
|
||||
@@ -76,10 +76,10 @@ export class WebscriptComponent {
|
||||
onSuccess = new EventEmitter();
|
||||
|
||||
data: any = undefined;
|
||||
|
||||
showError: boolean = false;
|
||||
|
||||
constructor(private apiService: AlfrescoApiService) {
|
||||
constructor(private apiService: AlfrescoApiService,
|
||||
private logService: LogService) {
|
||||
}
|
||||
|
||||
ngOnChanges(changes) {
|
||||
@@ -101,8 +101,8 @@ export class WebscriptComponent {
|
||||
this.onSuccess.emit(this.data);
|
||||
|
||||
resolve();
|
||||
}, function (error) {
|
||||
console.log('Error' + error);
|
||||
}, (error) => {
|
||||
this.logService.log('Error' + error);
|
||||
reject();
|
||||
});
|
||||
});
|
||||
@@ -128,7 +128,7 @@ export class WebscriptComponent {
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.log('error during the cast as datatable');
|
||||
this.logService.error('error during the cast as datatable');
|
||||
}
|
||||
|
||||
return datatableData;
|
||||
|
Reference in New Issue
Block a user