Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
can.computes with can.Map.prototype.attr() do not set up bindings #626
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.
Example of dynamic URL:
Thanks. Anyway you could add a test? Also, can you add a check that it updates if you add a property too? You will need to tell __reading about the __keys event (you can find this happening other places).
Ah, too bad you missed the hangout today where I went over can.Map in detail :-).