| Contents [0/5] |
| Forms and validation [1/5] |
| Project [2/5] |
| Another seed, using a web service [3/5] |
| Guest Lecture on UX [4/5] |
| Twitter API keys [5/5] |
| Forms and validation [1/5] |
Trickier than you might expect!
But it's complicated.
I think we need a textbook!
Get ng-book2. It is not simply a rehash of the tutorials.
A relevant blog post on forms from the authors.
| Project [2/5] |
Project descriptions due midnight next monday
| Another seed, using a web service [3/5] |
Here is an example of the use of services: angular2-seed
Should work for you as before, simply using:
npm install npm start open http://localhost:3000/ in your browser (not automatic)
Interesting bits:
SeedApp has top-level routes: Home, About, RepoBrowser.
RepoBrowser has nested routes: RepoList, RepoDetail.
GitHub is an injectable service.
makeRequest method uses RxJS
Observables, which we will talk about later.
Obervable.map allows you to transform all of the
values returned by an Observable.
(res) => res.json() takes a string
and parses it into a json object.
RepoDetail, Obervable.subscribe
is similar to Promise.then.
RepoList, async calls Obervable.subscribe.
01 |
<li *ngFor="#repo of repos | async"> <a [routerLink]=" ['RepoDetail', {org: repo.owner.login, name: repo.name}] "> {{ repo.name }} </a> </li> |
| Guest Lecture on UX [4/5] |
By Craig Miller
| Twitter API keys [5/5] |
Here's a sequence of steps to get a twitter API key.
Revised: 2008/03/17 13:01