I have the variable:
compromissoInicio = ‘’;
No onInit
, I have:
this.enviaForm(this.funcoes.homeAtualiza);
That is, if homeAtualiza
is true
, the system updates the information as follows:
... submita form ...
this.compromissoInicio = retorno[‘compromisso_inicio’];
In HTML, I have:
{{ compromissoInicio | date:‘dd/MM/yyyy HH:mm:ss’ }}
The problem is that if homeAtualiza
is true
, every time you return to the home page, the system will unnecessarily query the webservice.
And, if homeAtualiza
is false
, the content of {{ compromissoInicio | date:‘dd/MM/yyyy HH:mm:ss’ }}
is empty.
I need a way that compromissoInicio
always stays with the last content loaded, if the page is not updated, in onInit
.