Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Angular for Enterprise Applications - Third Edition

You're reading from  Angular for Enterprise Applications - Third Edition

Product type Book
Published in Jan 2024
Publisher Packt
ISBN-13 9781805127123
Pages 592 pages
Edition 3rd Edition
Languages
Author (1):
Doguhan Uluca Doguhan Uluca
Profile icon Doguhan Uluca

Table of Contents (14) Chapters

Preface 1. Angular’s Architecture and Concepts 2. Forms, Observables, Signals, and Subjects 3. Architecting an Enterprise App 4. Creating a Router-First Line-of-Business App 5. Designing Authentication and Authorization 6. Implementing Role-Based Navigation 7. Working with REST and GraphQL APIs 8. Recipes – Reusability, Forms, and Caching 9. Recipes – Master/Detail, Data Tables, and NgRx 10. Releasing to Production with CI/CD 11. Other Books You May Enjoy
12. Index
Appendix A

Configuring server proxies with the Angular CLI

Some state management libraries, especially convention-based entity stores like NgRx Data, make assumptions about accessing server-side data. In the case of NgRx Data, the library wants to access the REST API via the /api path hosted on the same port as your Angular app. We must leverage the Angular CLI’s proxy feature to accomplish this during development.

Normally, HTTP requests are sent to our web server, and our API server should have the same URL. However, during development, we usually host both applications on two different ports of http://localhost. Certain libraries, including NgRx Data, require that HTTP calls be on the same port. This creates a challenge for creating a frictionless development experience. For this reason, the Angular CLI ships with a proxy feature with which you can direct the /api path to a different endpoint on your localhost. This way, you can use one port to serve your web app and your API requests...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}