私のイオンアプリでは、情報を編集して保存できるページがあります。情報の1つは画像です。新しい画像を選択するには、選択する画像を含むページに移動するように設計されています。ページから移動してそのページに戻ったときに変更が消える - Ionic App
したがって、ユーザーが他のテキストフィールドを変更してイメージを変更しようとすると、ページから離れて新しいイメージを選択する必要があります。しかし、画像を選択して戻ってしまえば、他のすべての変更はなくなり、古いデータに戻ります。
ユーザーがページに戻ると他の情報を保持したい。あなたがページから移動後、これは部品が破壊されるためである
<div class="content content-top content-bottom">
<ch-device-avatar ng-model="client" ch-size="xxlarge" ch-color="light"
ng-click="go(STATES.DEVICES_EDIT_ICON, {'macAddress': macAddress})">
<ch-avatar ch-icon="ion-edit" ch-size="small" ch-color="positive"></ch-avatar>
</ch-device-avatar>
</div>
<form id="client-form" class="form" name="forms.clientForm" ng-submit="save()" novalidate>
<label class="item item-input item-floating-label" ch-input-container>
<span class="input-label">{{ 'main.label-device-name' | i18n }}</span>
<input type="text" name="name" placeholder="{{ 'main.label-device-name' | i18n }}" autocomplete="off"
ng-model="client['name']" ng-maxlength="64" required>
</label>
<div ng-messages="forms.clientForm.name.$error" role="alert" ch-messages="name" multiple>
<div class="hint hint-error" ng-message="required">{{ 'common.error-required' | i18n }}</div>
<div class="hint hint-error" ng-message="maxlength">{{ 'common.error-max-length' | i18n:'65' }}</div>
</div>
</form>