mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ACA-4650] Use NodeCommentsService for ADF_COMMENTS_SERVICE (#8169)
* ACA-4650 Use NodeCommentsService for ADF_COMMENTS_SERVICE * ACA-4650 Register services at component level
This commit is contained in:
parent
491d16f562
commit
570bfb235c
@ -16,11 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||||
|
import { ADF_COMMENTS_SERVICE } from '@alfresco/adf-core';
|
||||||
|
import { NodeCommentsService } from './services/node-comments.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-node-comments',
|
selector: 'adf-node-comments',
|
||||||
templateUrl: './node-comments.component.html',
|
templateUrl: './node-comments.component.html',
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
providers: [{
|
||||||
|
provide: ADF_COMMENTS_SERVICE,
|
||||||
|
useClass: NodeCommentsService
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
export class NodeCommentsComponent {
|
export class NodeCommentsComponent {
|
||||||
@Input()
|
@Input()
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NodeCommentsComponent } from './node-comments.component';
|
import { NodeCommentsComponent } from './node-comments.component';
|
||||||
import { ADF_COMMENTS_SERVICE, CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { NodeCommentsService } from './services/node-comments.service';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -27,12 +26,6 @@ import { NodeCommentsService } from './services/node-comments.service';
|
|||||||
CoreModule
|
CoreModule
|
||||||
],
|
],
|
||||||
declarations: [NodeCommentsComponent],
|
declarations: [NodeCommentsComponent],
|
||||||
exports: [NodeCommentsComponent],
|
exports: [NodeCommentsComponent]
|
||||||
providers: [
|
|
||||||
{
|
|
||||||
provide: ADF_COMMENTS_SERVICE,
|
|
||||||
useClass: NodeCommentsService
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class NodeCommentsModule {}
|
export class NodeCommentsModule {}
|
||||||
|
@ -16,11 +16,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||||
|
import { ADF_COMMENTS_SERVICE } from '@alfresco/adf-core';
|
||||||
|
import { TaskCommentsService } from './services/task-comments.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-task-comments',
|
selector: 'adf-task-comments',
|
||||||
templateUrl: './task-comments.component.html',
|
templateUrl: './task-comments.component.html',
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
providers: [{
|
||||||
|
provide: ADF_COMMENTS_SERVICE,
|
||||||
|
useClass: TaskCommentsService
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
export class TaskCommentsComponent {
|
export class TaskCommentsComponent {
|
||||||
@Input()
|
@Input()
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { TaskCommentsComponent } from './task-comments.component';
|
import { TaskCommentsComponent } from './task-comments.component';
|
||||||
import { TaskCommentsService } from './services/task-comments.service';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { ADF_COMMENTS_SERVICE, CoreModule } from '@alfresco/adf-core';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -27,12 +26,6 @@ import { ADF_COMMENTS_SERVICE, CoreModule } from '@alfresco/adf-core';
|
|||||||
CoreModule
|
CoreModule
|
||||||
],
|
],
|
||||||
declarations: [TaskCommentsComponent],
|
declarations: [TaskCommentsComponent],
|
||||||
exports: [TaskCommentsComponent],
|
exports: [TaskCommentsComponent]
|
||||||
providers: [
|
|
||||||
{
|
|
||||||
provide: ADF_COMMENTS_SERVICE,
|
|
||||||
useClass: TaskCommentsService
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class TaskCommentsModule {}
|
export class TaskCommentsModule {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user