DEV Community

Discussion on: How do you develop angular application with with different back-end technologies

Collapse
 
binarypatrick profile image
BinaryPatrick

To add to this, thinking of the front end and back end as two separate things will also help you see a lot of security and us implications that may otherwise be missed. Things like auth, error handling, and how data is sent and received are all significant aspects to consider. When creating your SPA, treat the API as if it is some random API you're using on the internet. Same for when your developing the API. Never trust the client, and always validate everything.

That said I actually have my API serve the SPA, and add the base href in dynamically. This way we can deploy it to any folder structure without worrying about re-transpiling.