Open bkarv opened 6 years ago
If you want to import this into an Angular 5 project you need to do
import * as domtoimage from 'dom-to-image';
This is the case with any package that doesn't have a proper ngModule to export.
import * as domtoimage from 'dom-to-image';
This worked for me in Angular 5. However, it doesn't work in Angular 6?
Thanks,
Use case:
First of all many thanks for your efforts in making this plugin.
I am trying to use this plugin in my Angular5/Ionic4. I've installed the plugin via npm:
npm install dom-to-image --save
I've imported plugin into my component:
import domtoimage from 'dom-to-image';
The issue is the app can't locate/recognise the dom-to-image. In visual studio is shows up in a popup on the link as module '*', meaning it can't locate the plugin in node_modules. I've used and imported other third party plugins including lodash without any issues. My app's package.json is below, does anyone know what might be the issue? Eg I noticed there is a .ts file in the package.
Expected behavior
Import dom-to-image
Actual behavior (stack traces, console logs etc)
App does not recognise dom-to-image
Library version
dom-to-image @2.6.0