I am trying to use camanjs with angular 6. How to add js lib and use it with angular when there are no types for it on npm. I follow many steps
install caman using npm
adding it to angular.json as a script using its path in node modules
import it into the component like
import * as Caman from 'path to caman in node module'
- the in AfterViewInit I use it like
ngAfterViewInit() { Caman('#image-id', function () { this.brightness(10); this.contrast(20); }); }
but when start server I get this error
link to code: https://stackblitz.com/edit/angular-d5g941

First do as How can i use foxTooltip with Angular?
Then add Caman.pack.js from nodemodules _ under caman folder into assets