bitovi/canjs — pull request #626 by onyxrev (2013-12-21 04:47:30+00:00)
Title: can.computes with can.Map.prototype.attr() do not set up bindings

If I use can.Map.prototype.attr() in a can.compute it doesn't set up a binding like can.Map.prototype.attr("some_property") does. I often use computes to generate dynamic links and I use .attr() to serialize the data in a can.Map for use in creating the URL parameters, for example. You may not know what data will be inside the can.Map, for example, so might want to use .attr() to explode the values out when they change.

Doesn't work:
```
var listenToMe = new can.Map({ iChange: "fromThis" });

can.compute(function(){
return listenToMe.attr().iChange;
});

listenToMe.attr("iChange", "toThis");
```

Does work:
```
var listenToMe = new can.Map({ iChange: "fromThis" });

can.compute(function(){
return listenToMe.attr("iChange");
});

listenToMe.attr("iChange", "toThis");
```

Example of dynamic URL:

```
can.compute(function(){
var routeParams = $.extend({}, listenToMe.attr(), { analytics_section_code: "report_builder", report: reportCode });
return can.route.url(routeParams);
});
```