Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular for Enterprise Applications

You're reading from   Angular for Enterprise Applications Build scalable Angular apps using the minimalist Router-first architecture

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781805127123
Length 592 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Doguhan Uluca Doguhan Uluca
Author Profile Icon Doguhan Uluca
Doguhan Uluca
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Angular’s Architecture and Concepts FREE CHAPTER 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

Standalone architecture

If you create a standalone project, your dependencies will be provided at the root level bootstrapApplication function. First-party and third-party libraries are updated to expose provider functions instead of modules. These provider functions are inherently tree-shakable, meaning the framework can remove them from the final package if unused. The provider functions can be customized using “with” functions, where a function named withFeature() can enable a certain feature.

In standalone projects and while using standalone components in general, we must explicitly import the features they use that are not included in the providers. This means pipes, directives (including fundamental directives like *ngIf -- unless you’re using @if, of course), and child components must be provided. This can feel more verbose and restrictive than an NgModule project, but the long-term benefits outweigh the short-term pain. The better information we can provide to the framework about our projects, the better the framework can optimize our code and improve performance.

You can migrate existing NgModule projects to a standalone project using the following command:

$ npx ng g @angular/core:standalone

Beware - this is not a foolproof or entirely automated process. Read about it more at https://angular.dev/reference/migrations/standalone.

The router is the next most powerful technology you must master in Angular.

You have been reading a chapter from
Angular for Enterprise Applications - Third Edition
Published in: Jan 2024
Publisher: Packt
ISBN-13: 9781805127123
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 $19.99/month. Cancel anytime
Banner background image