Skip to content

Commit

Permalink
Merge pull request #781 from mkautzmann/next
Browse files Browse the repository at this point in the history
Change m.module to m.mount in documentation
  • Loading branch information
lhorie committed Aug 28, 2015
2 parents d3cbbef + 343ffc8 commit 1b326ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ app.view = function(ctrl) {


//initialize
m.module(document.getElementById("example"), app);
m.mount(document.getElementById("example"), app);
```

---
Expand Down
8 changes: 4 additions & 4 deletions dragdrop.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//drag and drop micro-library
function dragdrop(element, options) {
options = options || {}

element.addEventListener("dragover", activate)
element.addEventListener("dragleave", deactivate)
element.addEventListener("dragend", deactivate)
Expand Down Expand Up @@ -35,7 +35,7 @@
for (var i = 0; i < files.length; i++) {
formData.append("file" + i, files[i])
}

return m.request({
method: "POST",
url: "http://localhost/api/files",
Expand Down Expand Up @@ -85,10 +85,10 @@
]
}

m.module(document.body, demo)
m.mount(document.body, demo)

//submodule helper
function submodule(module, args) {
return module.view.bind(this, new module.controller(args))
}
</script>
</script>
4 changes: 2 additions & 2 deletions guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@
};

//initialize the application
m.module(document, {controller: todo.controller, view: todo.view});
</script>
m.mount(document, {controller: todo.controller, view: todo.view});
</script>
10 changes: 5 additions & 5 deletions mvc.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
},
view: function(ctrl) {
var contact = ctrl.contact()

return m("form", [
m("label", "Name"),
m("input", {oninput: m.withAttr("value", contact.name), value: contact.name()}),

m("label", "Email"),
m("input", {oninput: m.withAttr("value", contact.email), value: contact.email()}),

m("button[type=button]", {onclick: ctrl.createContact}, "Create")
])
}
Expand All @@ -92,5 +92,5 @@
}
}

m.module(document.body, ContactsWidget)
</script>
m.mount(document.body, ContactsWidget)
</script>

0 comments on commit 1b326ee

Please sign in to comment.