func (b *BaseViewModel) Get(keyPath string) *js.Object { obj := property.Get(b.Object, keyPath) if obj == js.Undefined { return obj } return obj.Invoke() }
func (b *BaseViewModel) Set(keyPath string, value interface{}) { obj := property.Get(b.Object, keyPath) if obj == js.Undefined { // if isArray(value) { // v.Set(key, NewObservableArray(value)) // } else { // v.Set(key, NewObservable(value)) // } panic("ViewModel has no key: " + keyPath) } else { obj.Invoke(value) } }