Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : can.Component Helper Functions

$
0
0
Pretty sure I answered my own question here. Need to use 
  1. isActive: function(options) {
        if(options.scope.attr('attrName') === 'true') {
            return options.fn(this);
        }
        else {
            return options.inverse(this);
        }
    },

Next question though. Shouldn't this be live bound? Changing the value of "attrName" to something other than "true" should cause the view to re-render, right?

Viewing all articles
Browse latest Browse all 3491

Trending Articles