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

Re : Property name event not firing on computed value

$
0
0
What you probably want to be doing is defining a custom Map constructor function like:

  1. BazMap = can.Map.extend({
  2.   baz: can.compute(function () {
  3.     return this.attr('foo') + ", " + this.attr('bar');
  4.   })
  5. })
  6. b = new BazMap({foo: "one", bar: "two"})
  7. b.attr("baz")

Viewing all articles
Browse latest Browse all 3491

Trending Articles