Search icon CANCEL
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
MongoDB, Express, Angular, and Node.js Fundamentals

You're reading from   MongoDB, Express, Angular, and Node.js Fundamentals Become a MEAN master and rule the world of web applications

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher
ISBN-13 9781789808735
Length 362 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Paul Oluyege Paul Oluyege
Author Profile Icon Paul Oluyege
Paul Oluyege
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

MongoDB, Express, Angular, and Node.js Fundamentals
Preface
1. Introduction to the MEAN Stack FREE CHAPTER 2. Developing RESTful APIs to Perform CRUD Operations 3. Beginning Frontend Development with Angular CLI 4. The MEAN Stack Security 5. Angular Declarables, Bootstrapping, and Modularity 6. Testing and Optimizing Angular Applications Appendix

Using Inbuilt Pipes, Custom Pipes, Custom Directives, and Observables


Angular Pipes

Pipes were initially referred to as a filter in Angular 1. They are used mainly for data transformation in HTML templates. The purpose of this feature is to reduce the complexity of tasks such as streaming data over a WebSocket, which involves getting data, transforming it, and then displaying it to users. Input data is converted into a desired output through the use of pipes.

For example, if we need a currency output of USD 1,000,000 and we have 1000000 as the data variable, then how do we achieve our output using the inbuilt pipe for currency in Angular?

We can achieve this by using a pipe with the | (pipe character) syntax in the template, as shown in the following snippet:

{{ 1000000 | currency : 'USD' }}

From the preceding code, we can see that the number 1000000 is converted into a currency string to be displayed in the template. The output is USD 1,000,000.

The output is fine-tuned by providing an optional...

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 ₹800/month. Cancel anytime