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