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

Re : Defining a can.Observe to achive automatic event handling in can.Control?

$
0
0
You can add your Observe to the options of your Control and rebind all events using this.on(). So something like this:

this.options.myObs = new Cat({...})
this.on();

Then if you have a '{myObs} name' event handler defined, that will be invoked when the name attribute is updated.

Viewing all articles
Browse latest Browse all 3491

Trending Articles