Preserve inputted value in input


#1

How to preserve the inputted value in input even when page change?


#2

Store the value in some rootscope variable or keep the history of a page enable


#3

IStore input in a provider variable, and pass the variable to the page on return. On your page…

storedInput: string;
this.storedInput = " ";
[textContent]="storedInput"

Works on textarea, no clue about ‘input’. It’s worth a try. The ‘placeholder’ property can be manipulated in the same fashion.

[placeholder]="storedInput"

If you’re not using a provider for some reason, pass the variable in navParams