Controllers in MVVM, How to get info from viewmodel to it's controller?

前端 未结 5 1387
时光取名叫无心
时光取名叫无心 2021-01-04 13:24

We are building an app using the MVVM pattern, we have controllers that wire up all the views and viewmodels using DI. All examples of MVVM I\'ve seen are really simplistic

5条回答
  •  悲&欢浪女
    2021-01-04 14:06

    How about using events wherein the controller subscribes to VM events or using a mediator pattern where in a mediator is injected in a VM.

提交回复
热议问题