Use closure as an IoC for view models.