I have created a js bin outlining some of the details.
My question is, without using Ember Data, how can I implement a "class" in ember that can observe all bindings, and on a change to the model, convert the observed property to a URL based off of the keys path to the data in the model object. Then, I can take it from there.
Please refer to the js bin as there is an application setup there, and ready for you.
To Recap. I am attempting hook into the model, and on any change, detect what was changed, what the key path is to the data that was changed is, grab the new data and convert the key path into a url.
I will also provide a preview of the model and a sample url to the model here.
Obj = Em.Object.create({
a: 'a',
b: 'b',
c: 'c',
d: Em.A([
{
da: 'da',
db: 'db',
dc: 'dc'
},{
da: 'da',
db: 'db',
dc: 'dc'
}
])
});
Let's say that the path Obj.d[0].db gets updated with new data. then the url would be
http://api.domain.com/d/0/db/
Some references that have helped me a bit:
Ember.js: Observing all object properties
How can an observer find out the before and after values of the observed property in Ember.js?