I am attempting to extract the original model object from a controller for the purpose of persistence (without utilizing ember-data). The straightforward approach would be:
controller.get('content');
However, this method is not effective. The issue can be summarized as follows:
controller.set("content", model);
Sets the content as intended and at that point
controller.get('content');
Works correctly. But if I then add other properties to the controller like:
controller.set('IamNotPartOfTheModel', false);
Unexpectedly, the 'content' now includes this new property. I anticipated the content to remain unchanged while the new property should only affect the controller itself. Although I understand that the controller acts as a proxy for the model and they are often treated interchangeably, shouldn't they still be kept separate when necessary? The main purpose of this structure is to distinguish between data meant for storage and data that is temporary. Am I overlooking something?