I have a controller that receives an event with some data. As a part of the processing this s new data it needs to modify a collection in another controller. Is it a bad idea to inject a controller into another controller to modify this collection?
Injecting a controller into another controller
204 views Asked by asawilliams At
2
I don't really understand what you mean by "a collection in another controller", but IMHO your collection should be in the model. Your first controller modifies the collection in the model which dispatches an event caught by the second controller.