New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can-event trows an error when inside #if block #1182

whitecolor opened this Issue Jul 29, 2014 · 0 comments


None yet
2 participants

whitecolor commented Jul 29, 2014

Was trying to wrap can-click handler in `if`` block but failed

<button {{#if handleClick}}can-click="clickHandler"{{/if}}>Click</button>

trowas an eror if handleClick is false, and works normal if handleClick is true


    tag: 'my-comp',

    scope: {
        handleClick: false,
        clickHandler: function(){

    template: '<button {{#if handleClick}}can-click="clickHandler"{{/if}}>Click</button>'



Should it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment