Angular 2 Cookbook
Copyright 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2017
Production reference: 1160117
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78588-192-3
www.packtpub.com
Credits
Author Matt Frisbie | Project Coordinator Ritika Manoj |
Reviewer Patrick Gillespie | Proofreader Safis Editing |
Acquisition Editor Vinay Argekar | Indexer Francy Puthiry |
Content Development Editor Arun Nadar | Graphics Kirk D'Penha |
Technical Editor Vivek Arora | Production Coordinator Deepika Naik |
Copy Editor Gladson Monteiro | Cover Work Deepika Naik |
About the Author
Matt Frisbie is currently a software engineer at Google. He was the author of the Packt Publishing bestseller AngularJS Web Application Development Cookbook and also has published several video series through O'Reilly. He is active in the Angular community, giving presentations at meetups and doing webcasts.
Writing a book on Angular 2 while the framework itself was unfinished was an immensely challenging endeavor. Fragmented examples, incomplete documentation, and a nascent developer community were just a handful of the many roadblocks I encountered on the journey to finishing this title, and it was only because of a legion of supporters that this book was finished and was able to do justice to the framework.
This book would not have been possible without the tireless work of all the Packt staff involved. I'd specifically like to thank Arun Nadar, Vivek Arora, Merwyn D'Souza, and Vinay Argekar for their editorial oversight and expertise, as well as Patrick Gillespie for his work as content reviewer. I'd also like to thank Jordan, Zoey, Scott, and my family and friends for cheering me on.
About the Reviewer
Patrick Gillespie has been into software development since 1996. He has both a bachelor's and a master's degree in computer science. In his spare time, he enjoys photography, spending time with his family, and working on various side projects for his website (http://patorjk.com/).
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Customer Feedback
Thank you for purchasing this Packt book. We take our commitment to improving our content and products to meet your needs seriouslythat's why your feedback is so valuable. Whatever your feelings about your purchase, please consider leaving a review on this book's Amazon page. Not only will this help us, more importantly it will also help others in the community to make an informed decision about the resources that they invest in to learn.
You can also review for us on a regular basis by joining our reviewers' club. If you're interested in joining, or would like to learn more about the benefits we offer, please contact us : customerreviews@packtpub.com.
Dedication
To my grandparents, Richard and Margery. Here's to upholding the family honor.
Preface
"Everybody has a plan until they get punched in the mouth." -Mike Tyson, undisputed heavyweight champion boxer
Soon after its creation in 2009, AngularJS grew into a widely popular foundational tool for building frontend applications. As years and releases went by, and the JavaScript community matured, the world of client-side programming broadened beyond what Angular was originally designed for. Its caretakers took stock and decided that a sweeping overhaul of the framework was in order.
AngularJS, now Angular 1, still exists and will be supported for the years to come, but in its wake lies Angular 2a wholly different animal built for the future of client-side computing. Angular 2 abandons antipatterns by the fistful and, instead, is reshaped into a precise and elegant software instrument. It embraces the impending renaissance of web technologies, building atop ES6, web components, web workers, TypeScript, and reactive programming, to name a few. It brings framework modularity to new heights, building itself around the concept that any modular piece of Angular 2 should be easily discarded or replaced. Best of all, Angular 2 offers a bountiful collection of configuration and tooling that will make your applications run at breakneck speed.
To many developers, Angular 2 is frightening because so much of it is new and unfamiliar. This book exists to offer you an approachable path to a full understanding of Angular 2, what it offers, and how best to use it. You will find both simple examples to set a foundational understanding, and complex demonstrations to hint at the framework's power. The book is organized into recipes that are independent of each other, so you are able to jump in at any point and immediately begin learning.
What this book covers
This book is up to date for the 2.4 release and is compatible through the 4.0 release as well, and it does not have any code based on the beta or release candidates.