Correcting code in web services example
This commit is contained in:
parent
5446a39702
commit
a13bd15a64
1 changed files with 5 additions and 0 deletions
|
|
@ -144,6 +144,11 @@ var users = m.request({method: "GET", url: "/user"})
|
||||||
return users.concat({name: "Jane"})
|
return users.concat({name: "Jane"})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function log(load) {
|
||||||
|
console.log(load)
|
||||||
|
return load
|
||||||
|
}
|
||||||
|
|
||||||
//assuming the response contains the following data: `[{name: "John"}, {name: "Mary"}]`
|
//assuming the response contains the following data: `[{name: "John"}, {name: "Mary"}]`
|
||||||
//then when resolved (e.g. in a view), the `users` getter-setter will contain a list of users
|
//then when resolved (e.g. in a view), the `users` getter-setter will contain a list of users
|
||||||
//i.e. users() //[{name: "John"}, {name: "Mary"}, {name: "Jane"}]
|
//i.e. users() //[{name: "John"}, {name: "Mary"}, {name: "Jane"}]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue