My problem is while using canJS Observable I can't use dots in object keys, because can think that some nesting available here.
So let's say if I create new observable:
var obs = new can.Observe( { "div.test-class": { "color": "#000000;" } } );
can fails with message
can.Observe: Object does not exist
And I can't create observable using just
var obs = new can.Observe( { ".test-class": { "color": "#000000;" } } );
because now can fails with the following error:
TypeError: current._set is not a function
Creating observable using following code
var obs = new can.Observe( { "div": {}, "div.test-class": { "color": "#000000;" } } );
works perfectly but I DON'T NEED nesting, and can tries to nest test-class
into div
inside observable.
So, any thoughts how I can achieve what I need?