add support for controller.prototype.onunload
This commit is contained in:
parent
762eeb7e31
commit
b23ffd1aee
7 changed files with 86 additions and 6 deletions
|
|
@ -222,6 +222,7 @@ Mithril = m = new function app(window) {
|
|||
if (index < 0) index = roots.length
|
||||
roots[index] = root
|
||||
modules[index] = module
|
||||
if (controllers[index] && typeof controllers[index].onunload == "function") controllers[index].onunload()
|
||||
controllers[index] = new module.controller
|
||||
m.endComputation()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue