html2canvas in angular 4

前端 未结 3 1861
别那么骄傲
别那么骄傲 2021-02-06 03:35

I am able to take a screenshot using html2canvas in angular 4 but i need to send the string image to the server side using a http post call

3条回答
  •  囚心锁ツ
    2021-02-06 04:08

    Make sure to import the script under the scripts list in angular-cli.json

    "scripts": [
    "../node_modules/html2canvas/dist/html2canvas.min.js"
    ]
    

    And in the class as:

    import * as html2canvas from "html2canvas"
    

提交回复
热议问题