chore(examples): fix dart issues with router example

This commit is contained in:
Matias Niemelä 2015-07-08 18:01:03 -07:00
parent 206c9bdd74
commit 2c37cc5fcb
1 changed files with 5 additions and 5 deletions

View File

@ -15,10 +15,10 @@ class DbService {
constructor(public http: Http) {}
getData() {
return new Promise((resolve, reject) => {
ObservableWrapper.subscribe(this.http.get('./db.json', {cache: true}),
(resp) => { resolve(resp.json()); });
});
var p = PromiseWrapper.completer();
ObservableWrapper.subscribe(this.http.get('./db.json'),
(resp) => { p.resolve(resp.json()); });
return p.promise;
}
drafts() {
@ -56,7 +56,7 @@ class InboxDetailCmp {
constructor(db: DbService, params: RouteParams) {
var id = params.get('id');
PromiseWrapper.then(db.email(id)).then((data) => { this.setEmailRecord(data); });
PromiseWrapper.then(db.email(id), (data) => { this.setEmailRecord(data); });
}
get fullName() { return this.firstName + ' ' + this.lastName; }