angular - @Injectable compared to plain old static methods -


i have utility class converts 1 object , vice versa.

export class converter {    public tofoo(bar: bar) : foo {}    public tobar(foo: foo) : bar {} } 

would better make class @injectable?

@injectable export class converter {    public tofoo(bar: bar) : foo {}    public tobar(foo: foo) : bar {} } 

or static method better in case?

export class converter {    static tofoo(bar: bar) : foo {}    static tobar(foo: foo) : bar {} } 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

nginx - phpPgAdmin - log in works but I have to login again after clicking on any links -