Mvvm model ViewModel

前端 未结 2 1087
旧巷少年郎
旧巷少年郎 2020-11-28 14:12

It can be named MVVM model or not? Because View interacts with DataModel through ViewModelData. Does View should interact only with ViewModelData? I did read somewhere that

2条回答
  •  悲&欢浪女
    2020-11-28 14:50

    One point of MVVM is that your view should not know your data model and vice versa. That's why there is a ViewModel. Right now, your ViewModel is wasted code. It does nothing.

    You may want to read up on MVVM a bit more, because explaining it is way too broad for the Q&A format here.

提交回复
热议问题