0.0.4 • Published 3 years ago

ngx-image-tool v0.0.4

Weekly downloads
24
License
-
Repository
-
Last release
3 years ago

NgxImageTool

NPM

Angular directive for retrieving meta data about an image from Azure Cognitive Services. Just use your key and Go!

Like binding to a regular click event in a template, you can do something like this:

<img src="http://some-image.jpg" [ngxImageTool] [config]="{subscriptionKey:"my-key"}" (dataLoaded)="onDataLoaded($event)" />

Installation

npm install --save ngx-image-tool

Usage

Add NgxImageToolModule to your list of module imports:

import { NgxImageToolModule } from 'ngx-image-tool';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, NgxImageToolModule],
  bootstrap: [AppComponent]
})
class AppModule {}

You can then use the directive in your templates:

@Component({
  selector: 'app',
  template: `
    <img src="http://some-image.jpg" [ngxImageTool] [config]="{subscriptionKey:"my-key"}" (dataLoaded)="onDataLoaded($event)" />
  `
})
export class AppComponent {
  onDataLoaded($event) {
    console.log(JSON.stringify($event));
  }
}

Options

Property nameTypeDefaultDescription
optionsany{subscriptionKey:"my-key"}Use your Azure Cognitive Services key here.
0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago