Skip to content

yc-ionic/image

Repository files navigation

Build Status Coverage Status MIT license

@yci/image

Installation

  1. Install the Ionic plugin
 npm i -S @yci/image
  1. Add it to your app’s NgModule.
// Import your library
import { ImageModule } from '@yci/image';

@NgModule({

  ...

  imports: [

    ...

    // Specify your library as an import
    ImageModule.forRoot()
  ],
  
  ...

})
export class AppModule { }

Usage

Once your library is imported, you can use its component in your Angular application:

<yci-image src="xxx.png"></yci-image>

Inputs

@Input() src: string;
@Input() ratio: number = 1; // height = width * ratio
@Input() width: string = '100%';
@Input('oss-style') style: string; // aliyun oss style

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

License

MIT © Yu Chen