changes in the docs: rename modules to components, change idiomatic controller and view usage
This commit is contained in:
parent
0addce57ba
commit
d5619d412e
19 changed files with 395 additions and 692 deletions
|
|
@ -99,7 +99,7 @@ User.listEven = function() {
|
|||
|
||||
//controller
|
||||
var controller = function() {
|
||||
this.users = User.listEven()
|
||||
return {users: User.listEven()}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -112,9 +112,11 @@ In the example below, we use the previously defined `listEven` model method and
|
|||
```javascript
|
||||
//controller
|
||||
var controller = function() {
|
||||
this.users = User.listEven().then(function(users) {
|
||||
if (users.length == 0) m.route("/add");
|
||||
})
|
||||
return {
|
||||
users: User.listEven().then(function(users) {
|
||||
if (users.length == 0) m.route("/add");
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue