Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myObj = SC.Object.create({
- // so either like this
- _cachedVal: "",
- value: function(key,value){
- if(value){
- this._cachedVal = value;
- }
- return this._cachedVal;
- }.property(),
- // or like this:
- value2: function(key,value){
- if(value) return value;
- else return "";
- }.property().cacheable()
- })
Add Comment
Please, Sign In to add comment