How to pass models from API to components

Issue

What’s the best way for transferring models between backend and frontend.

  • Is it better to clone the backend ones in frontend even if not all
    properties are used ?
  • Or use DTOs to transfer only necessary properties for each use-case ?

If there is a best practice, design-pattern or any other suggestion I’m interested to know.

For information my stack is Spring Boot and Angular 6.

Solution

try to use swagger mate

https://dzone.com/articles/using-swagger-to-connect-a-backend-to-an-angular-f

hope this helps

Answered By – vikvincer

Answer Checked By – Marilyn (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.