Book Image

Expert Angular

By : Sridhar Rao Chivukula
Book Image

Expert Angular

By: Sridhar Rao Chivukula

Overview of this book

Got some experience of Angular under your belt? Want to learn everything about using advanced features for developing websites? This book is everything you need for the deep understanding of Angular that will set you apart from the developer crowd. Angular has introduced a new way to build applications. Creating complex and rich web applications, with a lighter resource footprint, has never been easier or faster. Angular is now at release 4, with significant changes through previous versions. This book has been written and tested for Angular release 4. Angular is a mature technology, and you'll likely have applications built with earlier versions. This book starts by showing you best practices and approaches to migrating your existing Angular applications so that you can be immediately up-to-date. You will take an in-depth look at components and see how to control the user journey in your applications by implementing routing and navigation. You will learn how to work with asynchronous programming by using Observables. To easily build applications that look great, you will learn all about template syntax and how to beautify applications with Material Design. Mastering forms and data binding will further speed up your application development time. Learning about managing services and animations will help you to progressively enhance your applications. Next you’ll use native directives to integrate Bootstrap with Angular. You will see the best ways to test your application with the leading options such as Jasmine and Protractor. At the end of the book, you’ll learn how to apply design patterns in Angular, and see the benefits they will bring to your development.
Table of Contents (18 chapters)

What this book covers

Chapter 1, Architectural Overview and Building a Simple App in Angular, explains Angular architecture, the basics of TypeScript, and also how to create a simple Angular application.

Chapter 2, Migrating AngularJS App to Angular App, shows how to migrate an AngularJS application to Angular 4, and we will also discuss best practices in migrating the application.

Chapter 3, Using Angular CLI to Generate Angular Apps with Best Practices, shows how to use Angular command-line interface to generate boilerplate code for an Angular application.

Chapter 4, Working with Components, discusses the life cycle of components. We will learn how to implement multiple and container components and also the interactions between different components.

Chapter 5, Implementing Angular Routing and Navigation, shows how to create routing strategies and routes for our Angular applications. We will learn the building blocks of routing, create routes, child routes, and secure routes using route guards. States are an important aspect in routing. We will implement states to make secure, multi-state application routes.

Chapter 6, Creating Directives and Implementing Change Detection, explains directives, different types of directive provided by Angular, and also how to create custom user-defined directives. We will deep dive into learning how Angular handles change detection and how we can utilize change detection in our apps.

Chapter 7, Asynchronous Programming Using Observables, shows how to take advantage of asynchronous programming with Angular by using Observable and Promises. In addition, we learn how to built a basic yet extensible asynchronous JSON API for querying the Marvel cinematic universe.

Chapter 8, Template and Data Binding Syntax, discusses the template syntax for writing expressions, operators, attributes, and attaching events to elements. Data binding is one of the key features that allows data mapping from data source to view target and vice versa. Additionally, we will also learn different ways of data binding and create lot of examples along.

Chapter 9, Advanced Forms in Angular, explains how to use and master reactive forms. We tackle the reactive part of reactive forms by emphasizing the relationship between your HTML models and your NgModels so every change on a given form is propagated to the model.

Chapter 10, Material Design in Angular, discusses Material Design, which is a new hype regarding design. In this chapter, we learn how to integrate material design with Angular. In addition, we learn how to use useful components such as grid and button.

Chapter 11, Implementing Angular Pipes, explain that transforming data in the views is one of the most common rituals we have to do it in our applications. We will learn how to transform values using various built-in pipes and create our own pipes. Additionally, we will learn how to pass parameters and customize pipes based on our needs.

Chapter 12, Implementing Angular Services, discusses services and factories, creating Angular services, accessing data from components using services, and creating asynchronous services.

Chapter 13, Applying Dependency Injection, explains how to create injectables, services, and provider classes that can be used as shared resources between various components. Additionally, we will learn how to create and use the objects created dynamically just-in-time using Inject, Provider, useClass, and useValue.

Chapter 14, Handling Angular Animation, show that animations are key to designing and building beautiful user experiences with smooth transitions and effects. We will learn and implement examples using animations, transitions, states, and keyframes.

Chapter 15, Integrating Bootstrap with Angular Application, discusses Bootstrap, which is arguably the most popular frontend framework out there and, in this chapter, we learn what it means to have an Angular x Bootstrap application.

Chapter 16, Testing Angular Apps Using the Jasmine and Protractor Frameworks, teaches the use of arguably the most important aspect of the software development process - testing Angular applications using the Jasmine and Protractor frameworks. We will start with an overview of each of the frameworks and then move on to the testing utilities provided by Angular. We will also create sample test scripts for testing Angular components and services.

Chapter 17, Design Patterns in Angular, discusses Typescript, is object-oriented programming language with which, we can leverage decades of knowledge on object-oriented architecture. In this chapter, we explore some of the most useful object-oriented design patterns and learn how to apply them in an Angular way.