Angular UI Development with PrimeNG
eBook - ePub

Angular UI Development with PrimeNG

  1. 384 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Angular UI Development with PrimeNG

Book details
Book preview
Table of contents
Citations

About This Book

Unleash the power of PrimeNG components to design compelling user interface for your Angular applicationsAbout This Book• Detailed insights into PrimeNG concepts, components and features with examples to help you make excellent User Interfaces for Angular web apps.• Get familiar with themes, layouts and customization in real world applications.• Develop Angular applications rapidly using advance tools and standards with best practices.Who This Book Is ForThis book is for everybody who would like to learn or create modern Angular based single page applications using PrimeNG component library. This book is a good choice for beginners to advanced users who are serious to learn modern Angular applications. The prerequisites for this book are some basic knowledge on the Angular 2+ version with TypeScript and CSS skills.What You Will Learn• Setup PrimeNG projects with SystemJS, Webpack, and Angular CLI.• Use theming concepts and layouts with grid systems and Bootstrap.• Work with enhanced input, select, button and panel components.• Apply countless DataTable features: sorting, filtering, grouping, and templating.• Meet data iteration components: DataList, DataGrid, Tree, and so on.• Build endless menu variations: SlideMenu, TieredMenu, MegaMenu, and so on.• Visualize your data representations with PrimeNG charts and GMap components.• Adopt best practices such as state management with @ngrx/store.• Write unit and end-to-end tests with Jasmine, Karma, and Protractor.In DetailPrimeNG is a leading UI component library for Angular applications with 80+ rich UI components. PrimeNG was a huge success in the Angular world and very quickly. It is a rapidly evolving library that is aligned with the last Angular release. In comparison with competitors, PrimeNG was created with enterprise applications in mind. This book provides a head-start to help readers develop real–world, single-page applications using the popular development stack.This book consists of 10 chapters and starts with a short introduction to single-page applications. TypeScript and Angular fundamentals are important first steps for subsequent PrimeNG topics. Later we discuss how to set up and configure a PrimeNG application in different ways as a kick-start. Once the environment is ready then it is time to learn PrimeNG development, starting from theming concepts and responsive layouts. Readers will learn enhanced input, select, button components followed by the various panels, data iteration, overlays, messages and menu components. The validation of form elements will be covered too. An extra chapter demonstrates how to create map and chart components for real-world applications. Apart from built-in UI components and their features, the readers will learn how to customize components to meet their requirements.Miscellaneous use cases are discussed in a separate chapter, including: file uploading, drag and drop, blocking page pieces during AJAX calls, CRUD sample implementations, and more. This chapter goes beyond common topics, implements a custom component, and discusses a popular state management with @ngrx/store. The final chapter describes unit and end-to-end testing. To make sure Angular and PrimeNG development are flawless, we explain full-fledged testing frameworks with systematic examples. Tips for speeding up unit testing and debugging Angular applications end this book.The book is also focused on how to avoid some common pitfalls, and shows best practices with tips and tricks for efficient Angular and PrimeNG development. At the end of this book, the readers will know the ins and outs of how to use PrimeNG in Angular applications and will be ready to create real- world Angular applications using rich PrimeNG components.Style and approachStep-by-step practical approach

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Angular UI Development with PrimeNG by Sudheer Jonna, Oleg Varaksin in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781788297868
Edition
1
Data Iteration Components
In this chapter, we will cover the basic and advanced features to visualize data with data iteration components provided by PrimeNG, which include DataTable, DataList, PickList, OrderList, DataGrid, DataScroller, Tree, and TreeTable. We will start with the DataTable component that offers extensive features, such as filtering, sorting, pagination, selection, reordering, column resizing, toggling, and many more. We will then focus on various other components, such as DataList, that render data in a listed format and provide data selection through the listed sets such as PickList and OrderList.
After that, we will also see two more data variation components such as DataGrid that arranges large datasets in the grid-oriented layout and DataScroller that lazily loads data according to the page scroll done by the user. The Tree and TreeTable components list data in a tree format, and they are mostly based on the same data model. At the end of this chapter, we will discuss a sophisticated component called Schedule to visualize calendar data, and we will demonstrate its usage with its lazy loading feature.
In this chapter, we will cover the following topics:
  • Multi feature DataTable
  • Selecting rows in DataTable
  • Sorting, filtering, and paginating data in DataTable
  • Customizing cell content with templating
  • Resizing, reordering, and toggling columns in DataTable
  • In-cell editing with DataTable
  • Making DataTable responsive
  • Using column and row grouping
  • Handling tons of data with lazy DataTable
  • Row expansion by providing row template
  • Exporting data in the CSV format
  • DataTable events and methods
  • Listing data with DataList
  • Listing data with PickList
  • Listing data with OrderList
  • Grid-organized data with DataGrid
  • On demand data loading with DataScroller
  • Visualizing data with Tree
  • Visualizing data with TreeTable
  • Managing events with Schedule

Multi feature DataTable

DataTable displays data in a tabular format. The table is an arrangement of data in rows and columns, or possibly in a more complex structure. It requires a value as an array of objects bound through the value property and columns defined with the p-column component. A basic example of the component with browser details to display in the list format would be written as follows:
<p-dataTable [value]="browsers">
<p-column field="engine" header="Engine"></p-column>
<p-column field="browser" header="Browser"></p-column>
<p-column field="platform" header="Platform"></p-column>
<p-column field="grade" header="Grade"></p-column>
</p-dataTable>
The browsers array consists of objects with engine, browser, platform, and grade properties. The field property will map the model object property, whereas the header property is used to display a column's heading. In real-time applications, we use services to fetch the data from remote data sources. In this case, service is created as an injectable service and it uses the HTTP module to fetch data. The browser service would be defined with observables as shown here:
@Injectable()
export class BrowserService {

constructor(private http: Http) { }

getBrowsers(): Observable<Browser[]> {
return this.http.get('/assets/data/browsers.json')
.map(response => response.json().data as Browser[]);
}
}
The component class has to define an array of browser objects (or items) for the value property. The items are retrieved from the remote service call as shown here:
browsers: Browser[];

con...

Table of contents

  1. Title Page
  2. Copyright
  3. Credits
  4. Foreword
  5. About the Authors
  6. About the Reviewer
  7. www.PacktPub.com
  8. Customer Feedback
  9. Preface
  10. Getting Started with Angular and PrimeNG
  11. Theming Concepts and Layouts
  12. Enhanced Inputs and Selects
  13. Button and Panel Components
  14. Data Iteration Components
  15. Amazing Overlays and Messages
  16. Endless Menu Variations
  17. Creating Charts and Maps
  18. Miscellaneous Use Cases and Best Practices
  19. Creating Robust Applications