his ebook helps you get the philosophy of Angular (currently 16.1.3), the new tools (like ES2015, TypeScript, SystemJS, Webpack, Angular CLI...), and each part of the framework in a pragmatic way. You will be able to kickstart your project by the end of the reading, and build your amazing apps!
AngularJS is incredibly productive once you have mastered it. Despite all of this, it doesn’t prevent us from seeing its weaknesses. AngularJS is not perfect, with some very difficult concepts to grasp, and traps hard to avoid. Most of all, the Web has changed since AngularJS was conceived. jаvascript has changed. New frameworks have emerged, with great ideas, or better implementation. We are not the kind of developers to tell you that you should use this tool instead of that one. We just happen to know some tools very well, and know what fits the project. AngularJS was one of those tools, allowing us to build well-tested web applications, and to build them fast. We also tried to bend it where it didn’t fit. Don’t blame us, it happens to the best of us.
Will Angular be the tool we will use without hesitation in our future projects? It’s hard to say right now, because the framework is really young and the ecosystem only just blooming. But Angular has a lot of interesting points, and a vision that few other frameworks have. It has been designed for the Web of tomorrow, with ECMAScript 6, Web Components and Mobile in mind.
Current versions:
• Angular: 16.1.3
• Angular CLI: 16.1.3
A.1. v16.1.0 - 2023-06-14
A.2. v16.0.0 - 2023-05-17
Building components and directives
• Introduce required inputs, as added in Angular v16 (2023-05-03)
Router
• Add a section about withComponentInputBinding to get router parameters and data as component inputs, as introduced in Angular v16 (2023-05-03)
Signals
• New chapter about Signals! (2023-05-17)
Advanced observables
• Use the takeUntilDestroyed RxJS operator introduced in Angular v16 (2023-05-03)
Author(s): Ninja Squad
Publisher: Ninja Squad
Year: 2023
Language: English
Pages: 327
1. Introduction
2. A gentle introduction to ECMAScript 2015+
2.1. Transpilers
2.2. let
2.3. Constants
2.4. Shorthands in object creation
2.5. Destructuring assignment
2.6. Default parameters and values
2.7. Rest operator
2.8. Classes
2.9. Promises
2.10. Arrow functions
2.11. Async/await
2.12. Sets and Maps
2.13. Template literals
2.14. Modules
2.15. Conclusion
3. Going further than ES2015+
3.1. Dynamic, static and optional types
3.2. Enters TypeScript
3.3. A practical example with DI
4. Diving into TypeScript
4.1. Types as in TypeScript
4.2. Enums
4.3. Return types
4.4. Interfaces
4.5. Optional arguments
4.6. Functions as property
4.7. Classes
4.8. Working with other libraries
4.9. Decorators
5. Advanced TypeScript
5.1. readonly
5.2. keyof
5.3. Mapped type
5.4. Union types and type guards
6. The wonderful land of Web Components
6.1. A brave new world
6.2. Custom elements
6.3. Shadow DOM
6.4. Template
6.5. Frameworks on top of Web Components
7. Grasping Angular’s philosophy
8. From zero to something
8.1. Node.js and NPM
8.2. Angular CLI
8.3. Application structure
8.4. Our first standalone component
8.5. Bootstrapping the app
9. The templating syntax
9.1. Interpolation
9.2. Using other components in our templates
9.3. Property binding
9.4. Events
9.5. Expressions vs statements
9.6. Local variables
9.7. Structural directives
9.8. Other template directives
9.9. Summary
10. Building components and directives
10.1. Introduction
10.2. Directives
10.3. Components
11. Styling components and encapsulation
11.1. Shadow DOM strategy
11.2. Emulated strategy
11.3. None strategy
11.4. Styling the host
12. Pipes
12.1. Pied piper
12.2. json
12.3. slice
12.4. keyvalue
12.5. uppercase
12.6. lowercase
12.7. titlecase
12.8. number
12.9. percent
12.10. currency
12.11. date
12.12. async
12.13. A pipe in your code
12.14. Creating your own pipes
13. Dependency injection
13.1. DI yourself
13.2. Easy to develop
13.3. Easy to configure
13.4. Other types of provider
13.5. Hierarchical injectors
13.6. DI without types
13.7. inject()
13.8. Services provided by the framework
14. Reactive Programming
14.1. Call me maybe
14.2. General principles
14.3. RxJS
14.4. Reactive programming in Angular
15. Testing your app
15.1. The problem with troubleshooting is that trouble shoots back
15.2. Unit tests
15.3. Fake dependencies
15.4. Testing components
15.5. Testing with fake templates, providers…
15.6. Simpler, cleaner unit tests with ngx-speculoos
15.7. End-to-end tests (e2e)
16. Send and receive data through HTTP
16.1. Getting data (provideHttpClient)
16.2. Transforming data
16.3. Advanced options
16.4. Interceptors
16.5. Context
16.6. Tests
17. Router
17.1. En route (provideRouter)
17.2. Navigation
17.3. Redirects
17.4. Matching strategy
17.5. Hierarchical and empty-path routes
17.6. Guards
17.7. Resolvers
17.8. Router events
17.9. Parameters and data
17.10. Bind parameters and data to component inputs
17.11. Lazy loading
18. Forms
18.1. Forms, dear forms
18.2. Template-driven
18.3. Code-driven
18.4. Adding some validation
18.5. Errors and submission
18.6. Add some style
18.7. Creating a custom validator
18.8. Grouping fields
18.9. Reacting to changes
18.10. Updating on blur or on submit only
18.11. FormArray and FormRecord
18.12. Strictly typed forms
18.13. Super simple validation error messages with ngx-valdemort
18.14. Going further: define custom form inputs with ControlValueAccessor
18.15. Summary
19. Zones and the Angular magic
19.1. AngularJS 1.x and the digest cycle
19.2. Angular and zones
20. Angular compilation: Just in Time vs Ahead of Time
20.1. Code generation
20.2. Ahead of Time compilation
21. Advanced observables
21.1. Subscribe, unsubscribe and async pipe
21.2. Leveraging operators
21.3. Building your own Observable
21.4. Managing state with stores (NgRx, NGXS, Akita and friends)
21.5. Conclusion
22. Advanced components and directives
22.1. View queries: ViewChild
22.2. Content: ng-content
22.3. Content queries: ContentChild
22.4. Conditional and contextual content projection: ng-template and ngTemplateOutlet
22.5. Host listener
22.6. Host binding
23. Angular modules
23.1. A compilation unit
23.2. Module composition
23.3. Functional, routed modules
24. Internationalization
24.1. The locale
24.2. Default currency
24.3. Translating text
24.4. Process and tooling
24.5. Translating messages in the code
24.6. Pluralization
24.7. Best practices
25. Performances
25.1. First load
25.2. Reload
25.3. Profiling
25.4. Runtime performances
25.5. NgZone
26. Signals
26.1. The reasons behind Signals
26.2. Signals API
26.3. Signals, components, and change detection
26.4. Sharing a signal between components
26.5. Memory leaks
26.6. Signals and RxJS interoperability
26.7. Signal-based components
27. Going to production
27.1. Environments and configurations
27.2. strictTemplates
27.3. Package your application
27.4. Server configuration
27.5. Conclusion
28. This is the end