Angularで作るER DIAGRAM TOOL – 第十四回 Export JSON

This time, Export JSON function.
As a flow,
· Click Export JSON in navbar
· Modal opens
· Download button to download

Then, from the modal download to be opened.

(1) Modal Download

/src/app/modal-download/modal-download.component.ts
https://github.com/dog-ears/er-diagram-tool/commit/aedce01e34f26747b19e1f0ecf72fc42a6065a0f#diff-a92da9eaef0bd78db9a049f376bcc7f1

/src/app/modal-download/modal-download.component.html
https://github.com/dog-ears/er-diagram-tool/commit/aedce01e34f26747b19e1f0ecf72fc42a6065a0f#diff-12d124f7e7d163dc41c5259d7ca56f0f

/src/app/app.module.ts
https://github.com/dog-ears/er-diagram-tool/commit/aedce01e34f26747b19e1f0ecf72fc42a6065a0f#diff-fc6b22833aeaf77f8440c4970ade705e

· Import of ModalDownloadComponent

The process to open from navbar next

(2) navbar

/src/app/navbar/navbar.component.ts
https://github.com/dog-ears/er-diagram-tool/commit/aedce01e34f26747b19e1f0ecf72fc42a6065a0f#diff-12468dba4acc93d6788c4f72b2b89a70

· Import and DI DomSanitizer
· Import ModalDownloadComponent

that’s all.
Next time, we plan to add a function to read the exported data.

シェアする

  • このエントリーをはてなブックマークに追加

フォローする