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

Re : Bind to length changes of an array

$
0
0
I am trying to avoid the following:

state.tasks.bind('length', function() { .... })

I guess I could bind to "add" and "remove" like below, but I thought it would have been easier to just bind to length
  1. '{state} tasks add': function() {
        console.log('task added');

    },

Viewing all articles
Browse latest Browse all 3491

Trending Articles