Is there a way to add methods to a Model's definition after it's already been defined?
I have a Product Model that is reused throughout my application. There a form when which I bind to this Product model in my app that needs a few extra methods on it so for the "Save" button using MVVM. However I don't want to add this to the Product Model definition because this particular form is the only one that needs the "Save" method.
Here is the jsfiddle working, without adding the Save function to the Model
http://jsfiddle.net/lelong37/RvsCg/1/
Here is the jsfiddle not working when I try to add the Save method to the Model
http://jsfiddle.net/lelong37/t8Bq2/3/
Your help is greatly appreciated.
I have a Product Model that is reused throughout my application. There a form when which I bind to this Product model in my app that needs a few extra methods on it so for the "Save" button using MVVM. However I don't want to add this to the Product Model definition because this particular form is the only one that needs the "Save" method.
Here is the jsfiddle working, without adding the Save function to the Model
http://jsfiddle.net/lelong37/RvsCg/1/
Here is the jsfiddle not working when I try to add the Save method to the Model
http://jsfiddle.net/lelong37/t8Bq2/3/
Your help is greatly appreciated.