From 2c37cc5fcb429ab6e7e4633fa1b1c3fa2f030ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Wed, 8 Jul 2015 18:01:03 -0700 Subject: [PATCH] chore(examples): fix dart issues with router example --- modules/examples/src/routing/inbox-app.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/examples/src/routing/inbox-app.ts b/modules/examples/src/routing/inbox-app.ts index dd6e1022f7..649f960498 100644 --- a/modules/examples/src/routing/inbox-app.ts +++ b/modules/examples/src/routing/inbox-app.ts @@ -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; }