document edge case return value
This commit is contained in:
parent
b988c14a54
commit
40fa1ea86b
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
To unload a module without loading another module, you can simply call `m.module` without a module parameter:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue