How to use faker in angular 5 /ionic environment.
Angular (6)? Just install and import it like other packages:
npm install faker --save
npm install @types/faker --save
then import into service/file/whatever like:
import * as faker from 'faker'
Profit :)
Also... if you want to import only single locale ( as switching locals does strangely not work with typescript ) - import from
import * as faker from 'faker/locale/de_AT' for example.
thank. It is very good library. I Like....
I like it very much too... kudos to the developer ^^
Just a heads up, installing Faker via the commands
npm install faker --save
npm install @types/faker --save
caused issues with two of my napa dependencies. For some reason twitter-bootstrap-wizard and jquery.flot.animator are removed, well the files are removed in node_module directories. Not sure how or why this is happening, but legit the only reason I cannot use it.
Most helpful comment
Angular (6)? Just install and import it like other packages:
npm install faker --savenpm install @types/faker --savethen import into service/file/whatever like:
import * as faker from 'faker'Profit :)
Also... if you want to import only single locale ( as switching locals does strangely not work with typescript ) - import from
import * as faker from 'faker/locale/de_AT'for example.