document edge case return value

This commit is contained in:
Leo Horie 2015-01-19 22:55:54 -05:00
parent b988c14a54
commit 40fa1ea86b

View file

@ -118,6 +118,8 @@ module1.controller = function() {
}
```
Normally, calling `m.module` will return the controller instance for that module, but there's one corner case: if `preventDefault` is called from a controller's `onunload` method as a result of calling `m.module`, then the `m.module` call will not instantiate the new controller, and will return `undefined`.
To unload a module without loading another module, you can simply call `m.module` without a module parameter:
```javascript