首页 > 解决方案 > 如何以角度将任何元素的 innerHtml 导出到 Microsoft Word?使用打字稿

问题描述

我有一个显示一个字母的模式,我想将该字母导出到 Microsoft Word。我创建了一个模态类,我在其中调用列表中的值,我希望用户提供一个选项,以便模态内的整个内容可以导出到 Microsft Word。因为我在模态中显示一个字母

请务必找到我的模态

<ng-template #template> <div class="modal-header"> <h4 class="modal-title pull-left">Letter</h4> <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body" *ngFor="let item of items"> {{item}} </div> </ng-template

标签: angulartypescriptfrontend

解决方案


您似乎想将 Angular 应用程序中的内容导出为 MS Word 文件

然后参考这个问题:Using Angular 2 to generate a Docx Files to generate .docx using https://docx.js.org/#/


推荐阅读