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

Re : How do I do the equivalent of compute.on/compute.off while using can.Map.define?

$
0
0
To better clarify the difference between get / set ....


The setter is called when some explicitly sets the value via  .attr.  In your example, no one is setting pages directly so "set" is not appropriate.

Get is called when someone tries to read the value.  People will be calling .attr("pages") ... so use get.

Viewing all articles
Browse latest Browse all 3491

Trending Articles