Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Next-Level UI Development with PrimeNG

You're reading from   Next-Level UI Development with PrimeNG Master the versatile Angular component library to build stunning Angular applications

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781803249810
Length 356 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dale Nguyen Dale Nguyen
Author Profile Icon Dale Nguyen
Dale Nguyen
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Introduction to PrimeNG FREE CHAPTER
2. Chapter 1: Introducing Angular and PrimeNG: A Powerful Combination 3. Chapter 2: Setting Up Your Development Environment 4. Chapter 3: Utilizing Angular’s Features and Improvements 5. Chapter 4: Integrating PrimeNG into Your Angular Project 6. Part 2: UI Components and Features
7. Chapter 5: Introducing Input Components and Form Controls 8. Chapter 6: Working with Table, List, and Card Components 9. Chapter 7: Working with Tree, TreeTable, and Timeline Components 10. Chapter 8: Working with Navigation and Layout Components 11. Part 3: Advanced Techniques and Best Practices
12. Chapter 9: Customizing PrimeNG Components with Theming 13. Chapter 10: Exploring Optimization Techniques for Angular Applications 14. Chapter 11: Creating Reusable and Extendable Components 15. Chapter 12: Working with Internationalization and Localization 16. Chapter 13: Testing PrimeNG Components 17. Part 4: Real-World Application
18. Chapter 14: Building a Responsive Web Application 19. Index 20. Other Books You May Enjoy

Introducing input components and form controls

Before getting into the main content of this chapter, let’s set the stage with an overview of input components and form controls. Angular provides two ways to handle user inputs through forms: template-driven and reactive forms. Both methods have their unique strengths, and choosing between them depends on the specific needs of your application.

Let’s have a look at a simple Angular form:

Figure 5.1 – Angular sample form

Figure 5.1 – Angular sample form

We will use both approaches to recreate this form.

Template-driven forms

Template-driven forms define controls directly within the DOM and then link them back to the underlying model. They shine in their simplicity, making them a go-to choice for straightforward use cases. For instance, when dealing with a form that has a small number of fields and uncomplicated validation rules, template-driven forms offer a rapid and effortless approach to implementing form...

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 $19.99/month. Cancel anytime