m.request: fix sample code in documentation
This commit is contained in:
parent
d3cbbef4d5
commit
f9953b8f74
1 changed files with 1 additions and 1 deletions
|
|
@ -408,7 +408,7 @@ demo.controller = function() {
|
||||||
demo.view = function(ctrl) {
|
demo.view = function(ctrl) {
|
||||||
//This view gets rendered before the request above completes
|
//This view gets rendered before the request above completes
|
||||||
//Calling .map doesn't throw an error because we defined the initial value to be an empty array, instead of undefined
|
//Calling .map doesn't throw an error because we defined the initial value to be an empty array, instead of undefined
|
||||||
return ctrl.users().map(function() {
|
return ctrl.users().map(function(user) {
|
||||||
return m("div", user.name)
|
return m("div", user.name)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue