Access the environment object in the parent view and pass it to the subview where the ViewModel is initialized. The parent view should handle injecting the environment object into the subview, ensuring the ViewModel has what it needs during initialization.