Skip to content

More error message improvements

Compare
Choose a tag to compare
@cherifGsoul cherifGsoul released this 08 Nov 16:13
· 9 commits to master since this release
  • Make the “Unable to bind” error message more useful, instead of Uncaught Error: can-event-queue: Unable to bind complete:
var vm = new SimpleMap({
    todo: {
        complete: false
    }
});
vm.handle = function() {} ;
var template = stache('<div on:complete:by:todo="handle()"></div>');
template(vm); // -> can-stache-bindings - Unable to bind "complete": "complete" is a property on a plain object "{"complete":false}". Binding is available with observable objects only. For more details check https://canjs.com/doc/can-stache-bindings.html#Callafunctionwhenaneventhappensonavalueinthescope_animation_'
  • Explain that elements always set properties to Strings