How to pass models from API to components


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.


try to use swagger mate

hope this helps

Answered By – vikvincer

Answer Checked By – Marilyn (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.