Book Image

Building Modern Web Applications Using Angular 4

By : Shravan Kumar Kasagoni
Book Image

Building Modern Web Applications Using Angular 4

By: Shravan Kumar Kasagoni

Overview of this book

<p>In the last few years, Angular has established itself as the number one choice of JavaScript Developers. What makes Angular special is performance and productivity. With Angular, developers can work on consistent coding patterns and build web applications that are powerful and scalable.</p> <p>This book will you get you up and running with Angular and teach how to build modern web applications. It starts with basics of Angular 2 and then brushes you up with the new features of Angular 4. You will learn the core concepts involved in building web applications with Angular such as Data Binding, Routing, Dependency Injection, and much more. The book teaches how to build components and use them to build web apps of your choice. It will help you to handle different kinds of forms and learn the concept of reactive programming. Finally the book teaches how to build visually appealing and responsive UIs.</p>
Table of Contents (15 chapters)

Preface

Building Modern Web Applications Using Angular helps readers to design and develop modern web applications. It provides a solid understanding of the Angular 4 framework. Readers will learn how to build and architect high-performance web applications mainly focusing on UI. This is an end-to-end guide for all the new features in Angular 4. This book also covers some of the latest JavaScript concepts in ECMAScript 2015, ECMAScript 2016, and TypeScript.

This book will take you from nowhere when it comes to building UI applications for Web and mobile to become a master using Angular 4. It will explain almost every feature of the Angular 4 framework with a particle approach and lots of examples, showing how to use them in real-world scenarios to build compelling UI applications. Chapters at the end of the book are dedicated to show how to build an end-to-end application UI using individual Angular 4 features that were explained in previous chapters.

What this book covers

Chapter 1, Getting Started, introduces the Angular 4 framework and its new features, how Angular 4 is better and more powerful than its predecessor Angular 1, development environment setup for Angular 4 applications. Also, it provides a quick insight into TypeScript and its features, how to write a basic Angular 4 app, and understanding its anatomy.

Chapter 2, Basics of Components, walks through the basics of Angular 4 components, starting with display data using interpolation syntax, property binding, attribute binding, working with DOM events, and two-way data binding. It also introduces structural directives for conditionally displaying data and attribute directives for conditional styling.

Chapter 3, Components, Services, and Dependency Injection, walks through how to develop Angular 4 applications using multiple components, communicating between components, sharing the data between these components using services and injecting services using dependency injection, as well as how dependency injection works.

Chapter 4, Working with Observables, focuses on reactive programming, Observables, RxJS, how Angular 4 implements Observables using RxJS, and using Observables and RxJS operators in Angular 4 applications.

Chapter 5, Handling Forms, introduces how to create different types of forms in Angular 4 applications to accept user input and validate it using template-driven forms, reactive forms, and validation directives.

Chapter 6, Building a Book Store Application, walks through how to structure tiny to a complex application using Angular 4 modules, build various types of user interfaces in a Book Store application, navigate between components using routing, interact with the server using the HTTP service.

Chapter 7, Testing, introduces how to write unit tests using Jasmine and Angular Test Utilities for various parts of Angular 4 applications.

Chapter 8, Angular Material, walks through how to build a single compelling UI, which flows across desktops, tablets, and mobile devices, using material design, and learning how to customize material design as per customer branding.

What you need for this book

This book assumes a basic knowledge of JavaScript, web development, how to use command line, Git, and node package manager (npm).

In this book, you will need the following software list:

Internet connectivity is required to install the necessary npm packages.

Who this book is for

This book is for developers building web applications who are new to the Angular world and interested in creating modern, responsive, complex UI applications using Angular 4. For developers who are already working with the AngularJS 1 framework, this book provides an upgrading path with new concepts.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, folder names, filenames, file extensions, path names, URLs, user input, and Twitter handles are shown as follows:

A block of code is set as follows:

import { Component } from '@angular/core'; 

@Component({ 
  selector: 'hello-world-app', 
  template: '<h1>Say Hello to Angular</h1>' 
}) 
class HelloWorldAppComponent { } 

Any command-line input or output is written as follows:

$ npm install json-server -save

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The complete set of code can also be downloaded from the following GitHub repository: https://github.com/PacktPublishing/Building-Modern-Web-Application-using-Angular. We also have other code bundles from our rich catalog of books and videos available at: https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.