fix console.log higher-order calls in docs
This commit is contained in:
parent
d3c9a28c25
commit
9a00707eeb
3 changed files with 17 additions and 5 deletions
|
|
@ -137,10 +137,12 @@ dashboard.controller = function() {
|
|||
|
||||
dashboard.view = function(ctrl) {
|
||||
return m("#example", [
|
||||
new autocompleter.view(ctrl.autocompleter, {onchange: m.withAttr("value", console.log)}),
|
||||
new autocompleter.view(ctrl.autocompleter, {onchange: m.withAttr("value", log)}),
|
||||
]);
|
||||
};
|
||||
|
||||
//an FP-friendly console.log
|
||||
var log = function(value) {console.log(value)}
|
||||
|
||||
|
||||
//initialize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue