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
file it is not recognizing CryptoJS
. Is there a way to use the library or a Angular equivalent?
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.