Versatile software engineer with a background in .NET consulting and CMS development. Working on regaining my embedded development skills to get more involved with IoT opportunities.
Have you considered dependency injection as a scenario? For example, what if I have a service class I depend on? If I inject that into my class constructor, I can easily test it.
Hi! I believe this scenario doesn't work anymore. If I'm not mistaken, since Angular 9 or 10, you can't use Angular features (like DI, Inputs/Outputs and Lifecycle hooks) in non-annotated classes.
So, for models, I believe interfaces are the best way to go, unless you have custom behaviour/properties (kinda like transient properties in Java entities, which are calculated from base properties).
Versatile software engineer with a background in .NET consulting and CMS development. Working on regaining my embedded development skills to get more involved with IoT opportunities.
Have you considered dependency injection as a scenario? For example, what if I have a service class I depend on? If I inject that into my class constructor, I can easily test it.
Hi! I believe this scenario doesn't work anymore. If I'm not mistaken, since Angular 9 or 10, you can't use Angular features (like DI, Inputs/Outputs and Lifecycle hooks) in non-annotated classes.
So, for models, I believe interfaces are the best way to go, unless you have custom behaviour/properties (kinda like transient properties in Java entities, which are calculated from base properties).
I apologize, I am not familiar with Angular and meant my comment as a general note for ES6/TypeScript. I appreciate your insight on Angular mechanics!
Heey, no need to apologize! It's all about sharing knowledge! Cheers!