Importing external library in the application


#1

I want to import CamanJs script in my application…I want to use all their functions in html file like

  <input
          type="range" 
          min="-100"
          max="100"
          step="1"
          value="0"
          data-filter="exposure"
  >

i installed camanjs npm install caman and i want to use their filters in my html page…how can i do that?


#2

hello…when i try to edit brightness of the image using CAMANJS .I added caman Javascript html attribute in the image tag…but it shows that

caman cannot bind to the property of the image src

i imported camanjs file in .ts file

import {Caman } from ‘caman’;

and my html file attribute is

 <img id="demo-image" data-caman="brightness({{text}})" src="img/best-nature-desktop-hd-wallpaper.jpg">     
   <div class="Filters">       
      <p>Brightness: <ion-badge color="secondary" style="float:right">{{text}}</ion-badge></p>    
            <ion-item>    
                     <ion-range min="-100" step="10" snaps="true" [(ngModel)]="text"> 
                           <ion-label range-left class="small-text">A</ion-label>    
                               <ion-label range-right>A</ion-label>           
                     </ion-range>       
             </ion-item>
    </div>