Merge branch 'next' of https://github.com/lhorie/mithril.js into patch-2
This commit is contained in:
commit
37266a2b8f
9 changed files with 30 additions and 25 deletions
|
|
@ -419,14 +419,14 @@ Often, you will want to do some work before the component is unloaded (i.e. clea
|
|||
var MyComponent = {
|
||||
controller: function() {
|
||||
return {
|
||||
onunload = function() {
|
||||
onunload: function() {
|
||||
console.log("unloading my component");
|
||||
}
|
||||
}
|
||||
},
|
||||
view: function() {
|
||||
return m("div", "test")
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
m.mount(document.body, MyComponent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue