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
Post a Comment