unlayer / angular-email-editor

Drag-n-Drop Email Editor Component for Angular
https://unlayer.com
MIT License
203 stars 166 forks source link

Can't use twice in same component #103

Open vikrambarnwal opened 1 year ago

vikrambarnwal commented 1 year ago

I want to use two email editor in same component.

<div class="container">
  <button (click)="exportHtml()">Export</button>
  <email-editor #editor1 (loaded)="editorLoaded($event)"></email-editor>
</div>

<div class="container">
  <button (click)="exportHtml()">Export</button>
  <email-editor #editor2 (loaded)="editorLoaded($event)"></email-editor>
</div>

@ViewChild(EmailEditorComponent) private emailEditor: EmailEditorComponent;

If i am trying viewchildren instead of viewchild ,issue as editor is not defined is coming in console.

can someone guide or help?

Thanks in advance.