mardi 21 mai 2019

Generic Angular component for many cases of use

I am setting up a major front-end project to develop with Angular CLI. This front-end project will rely on a very large amount of Rest API develop with Php Laravel framework. These APIs are 90% identical types, with listing, create, modify, delete (...) entities.

By using a library of components like PrimeNG, I really hope to save some time for the development of my components and the implementation of the project as a whole. That said, I'm a new Angular developer and I'm not sure I know all the good practices, even after reviewing a number of documentations and starting a prototype.

My goal is to not have an angular component for each Rest API. For example, all APIs that return a listing should be accessible via a single PrimeNg Generic TurboTable component, right? This component would of course be configurable according to the context of use and the current instance. For example, I could have multiple instances of this genericComponent to display the list of commands, the list of products (...)

What do you think ? Do you have any suggestions or clarifications to help me, please?

Warm regards, Sebastian

Aucun commentaire:

Enregistrer un commentaire