3 ms·
I'm not 100% sure where it fits in, but I tend to write have a Formatter service that is used by the controller to pass the model to the correct view. The Form
by jrgnsd 14y ago
I'm not 100% sure where it fits in, but I tend to write have a Formatter service that is used by the controller to pass the model to the correct view.
The Formatter inspects the Request to determine what format it should be (html, json, xml, etc.), and returns the correct View to the Controller, which then passes the Model to that View.