1.0.3 • Published 7 years ago
@yca/ratio v1.0.3
@yca/ratio
Installation
- Install the Ionic plugin
npm i -S @yca/ratio
- Add it to your app’s NgModule.
// Import your library
import { RatioModule } from '@yca/ratio';
@NgModule({
...
imports: [
...
// Specify your library as an import
RatioModule.forRoot()
],
...
})
export class AppModule { }
Usage
Once your library is imported, you can use its directive in your Angular application:
<div [ycaRatio]="1"></div>
Inputs
@Input() ratio: number = 1; // height = width * ratio
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
License
MIT © Yu Chen