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, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||
import { AlfrescoTranslateService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslateService, LogService } from 'ng2-alfresco-core';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { ActivitiTaskListService } from './../services/activiti-tasklist.service';
|
||||
import { Form } from '../models/form.model';
|
||||
@@ -55,7 +55,8 @@ export class ActivitiStartTaskButton {
|
||||
* @param taskService
|
||||
*/
|
||||
constructor(private translateService: AlfrescoTranslateService,
|
||||
private taskService: ActivitiTaskListService) {
|
||||
private taskService: ActivitiTaskListService,
|
||||
private logService: LogService) {
|
||||
|
||||
if (translateService) {
|
||||
translateService.addTranslationFolder('ng2-activiti-tasklist', 'node_modules/ng2-activiti-tasklist/src');
|
||||
@@ -77,7 +78,7 @@ export class ActivitiStartTaskButton {
|
||||
},
|
||||
(err) => {
|
||||
window.alert('An error occurred while trying to add the task');
|
||||
console.log(err);
|
||||
this.logService.error(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -112,7 +113,7 @@ export class ActivitiStartTaskButton {
|
||||
},
|
||||
(err) => {
|
||||
window.alert('An error occurred while trying to get the forms');
|
||||
console.log(err);
|
||||
this.logService.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user