Ionic factory with parameter

I need an example of a factory that takes parameters and the way to initialise such a factory. Thanks.