@yci/image
Installation
- Install the Ionic plugin
npm i -S @yci/image
- 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