Managing dirty and undirty apps
Naturally, it's good if the saving process happens every time you press the Save button.
However, if possible, wouldn't you prefer to have the Save button available only when changes have been made?
Here, we will implement the logic into the controller that will judge whether or not changes have been made after an input.
MyAccount
First, we will implement a simple form from MyAccount
. But, before that, Quotation
and Bill
separated the controller, but we didn't make the change in MyAccount
! Let's separate it quickly and add it to app/Application.js
.
Using the MyApp.controller.bill.Edit
class as reference, let's go ahead and make the MyApp.controller.myaccount.Edit
class.
Apart from the class name, it's exactly the same process (source file: 05_management_of_dirty_and_undirty_myaccount/app/controller/myaccount/Edit.js
).
After you have finished building the previous class, let's add the myaccount.Edit
controller to the controller property of app/Application.js
.
Now add...