Book Image

Switching to Angular - Third Edition

By : Minko Gechev
Book Image

Switching to Angular - Third Edition

By: Minko Gechev

Overview of this book

Align your work to stable APIs of Angular, version 5 and beyond, with Angular expert Minko Gechev. Angular is the modern Google framework for you to build high-performance, SEO-friendly, and robust web applications. Switching to Angular, Third Edition, shows you how you can align your current and future development with Google's long-term vision for Angular. Gechev shares his expert knowledge and community involvement to give you the clarity you need to confidently switch to Angular and stable APIs. Minko Gechev helps you get to grips with Angular with an overview of the framework, and understand the long-term building blocks of Google's web framework. Gechev then gives you the lowdown on TypeScript with a crash course, so you can take advantage of Angular in its native, statically typed environment. You'll next move on to see how to use Angular dependency injection, plus how Angular router and forms, and Angular pipes, are designed to work for your projects today and in the future. You'll be aligned with the vision and techniques of the one Angular, and be ready to start building quick and efficient Angular applications. You'll know how to take advantage of the latest Angular features and the core, stable APIs you can depend on. You'll be ready to confidently plan your future with the Angular framework.
Table of Contents (10 chapters)

Using Angular directives

We have already built our simple "Hello world!" app. Now, let's start building something that is closer to a real-life application. By the end of this section, we'll have a simple application that lists a number of items we need to do and greets us at the header of the page.

Let's start by developing the root component. The two modifications from the preceding example that we need to make are renaming the target property to name and adding a list of todos to the controller definition of the component:

// ch5/ng-for/detailed-syntax/app.ts 
 
import {Component, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';

@Component({
  selector: 'app',
  templateUrl: './app.html&apos...