diff --git a/README.md b/README.md index 5fc337d..d2ba20d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,71 @@ # ng2-fittext -An Angular2 directive for autoscale the font size of an element to fit an upper level container. + +An Angular2 directive written in pure typescript (and without jquery!), inspired from http://fittextjs.com/, for autoscale the font size of an element to fit an upper level container. + +### Installation + +Install the library +```sh +$ npm install --save ng2-fittext +``` + +### Usage + +Import it in your Angular2 project like a directive + +1) Declare it in your module + ```sh + import {FittextDirective} from "ng2-fittext/ng2-fittext"; + @NgModule({ + imports: [ + ... + ], + declarations: [ + FittextDirective + ] + }) + + ``` + +1) Use it in your components + ```sh + import {Component} from '@angular/core'; + + @Component({ + selector: 'label', + template: `