Open weepy opened 12 years ago
is it possible to have methods on a model ?
I thought also it might be useful to add binding such that if the return type is a function - then it is called before being used.
so we could have :
model : { first: 'John', second: 'Smith', fullName: function() { return this.first() + ' ' + this.second() } }
does this fit into the framework ?
Sometimes it is uesful to just get the function and not the result of the function, for example for some sort of state machine.
But you can explicity call the funtion like this: someObject.model.get('fullName')();
is it possible to have methods on a model ?
I thought also it might be useful to add binding such that if the return type is a function - then it is called before being used.
so we could have :
does this fit into the framework ?