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 our app
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 component's controller definition:
// ch4/ts/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({ ...
Get Getting Started with Angular - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.