chore(examples): fix dart issues with router example
This commit is contained in:
parent
206c9bdd74
commit
2c37cc5fcb
|
@ -15,10 +15,10 @@ class DbService {
|
||||||
constructor(public http: Http) {}
|
constructor(public http: Http) {}
|
||||||
|
|
||||||
getData() {
|
getData() {
|
||||||
return new Promise((resolve, reject) => {
|
var p = PromiseWrapper.completer();
|
||||||
ObservableWrapper.subscribe(this.http.get('./db.json', {cache: true}),
|
ObservableWrapper.subscribe(this.http.get('./db.json'),
|
||||||
(resp) => { resolve(resp.json()); });
|
(resp) => { p.resolve(resp.json()); });
|
||||||
});
|
return p.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
drafts() {
|
drafts() {
|
||||||
|
@ -56,7 +56,7 @@ class InboxDetailCmp {
|
||||||
|
|
||||||
constructor(db: DbService, params: RouteParams) {
|
constructor(db: DbService, params: RouteParams) {
|
||||||
var id = params.get('id');
|
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; }
|
get fullName() { return this.firstName + ' ' + this.lastName; }
|
||||||
|
|
Loading…
Reference in New Issue