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 -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -