#967 custom stencil mapping demo

This commit is contained in:
Denys Vuika
2016-11-16 11:22:41 +00:00
committed by Mario Romano
parent be2a571608
commit 24daa074e0
2 changed files with 15 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
import { NgModule, Component, ElementRef } from '@angular/core';
import { TextFieldWidgetComponent } from 'ng2-activiti-form';
import { NgModule, Component } from '@angular/core';
import { WidgetComponent } from 'ng2-activiti-form';
@Component({
selector: 'custom-editor',
@@ -7,17 +7,17 @@ import { TextFieldWidgetComponent } from 'ng2-activiti-form';
<div style="color: red">Look, I'm a custom editor!</div>
`
})
export class CustomEditorComponent extends TextFieldWidgetComponent {
export class CustomEditorComponent extends WidgetComponent {}
constructor(elementRef: ElementRef) {
super(elementRef);
}
}
@Component({
selector: 'custom-stencil-01',
template: `<div style="color: green">ADF version of custom Activiti stencil</div>`
})
export class CustomStencil01 extends WidgetComponent {}
@NgModule({
declarations: [ CustomEditorComponent ],
exports: [ CustomEditorComponent ],
entryComponents: [ CustomEditorComponent ]
declarations: [ CustomEditorComponent, CustomStencil01 ],
exports: [ CustomEditorComponent, CustomStencil01 ],
entryComponents: [ CustomEditorComponent, CustomStencil01 ]
})
export class CustomEditorsModule {}