Correcting code in web services example

This commit is contained in:
eddyystop 2014-06-03 14:57:52 -04:00
parent 5446a39702
commit a13bd15a64

View file

@ -144,6 +144,11 @@ var users = m.request({method: "GET", url: "/user"})
return users.concat({name: "Jane"})
})
function log(load) {
console.log(load)
return load
}
//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
//i.e. users() //[{name: "John"}, {name: "Mary"}, {name: "Jane"}]