How to use CryptoJS with Angular 4

后端 未结 3 1180
礼貌的吻别
礼貌的吻别 2020-12-30 02:54

When I was not using Angular 4, I would just put the script tags for the library. Even when I put the script tags in the index.html fi

3条回答
  •  臣服心动
    2020-12-30 03:25

    Install using NPM and import below statement in you component file.

    npm install crypto-js
    
    import * as crypto from 'crypto-js';
    

    now you can use crypto in your component file.

提交回复
热议问题