angular2-fractionize
v0.0.2
Published
Angular Pipe that outputs decimals into an approximate fraction
Downloads
3
Maintainers
Readme
angular2-fractionize
Angular Pipe that formats numbers to a fraction
Install
npm install angular2-fractionize
FractionizeModule
import { FractionizeModule } from 'angular2-fractionize';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FractionizeModule
],
bootstrap: [ AppComponent ],
})
export class AppModule {}
FractionizePipe
@Component({
// ...
})
class AppComponent() {
x: string = `2.4`;
}
<p> {{ description | fractionize }} </p>
Outputs: 2 ⅖