How to solve accentuation problem in Ionic
Guys, I went to pass a data through the routes in Ionic, Angular, only the data is a string with accent, when I put the variable that receives the value to show in the title it shows good, however, when I enter another page and return it converts the letter with accent to UTF - 8 (by the research I performed). In addition, I tried with the reverse decode, but whenever it comes in and back it converts again.
ngOnInit() {
this.inscricao = this.route.params.subscribe(param => {
this.tituloPesquisa = param['titulo']
});
this.listaProdutos = this.gSacola.getProdutos();
}
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button defaultHref="/"></ion-back-button>
</ion-buttons>
<ion-title>{{ tituloPesquisa }}</ion-title>
</ion-toolbar>
</ion-header>
0
Author: Vinicius Cortez, 2020-04-12
1 answers
Guys, the solution I found was instead of passing the data directly on the route using a queryParams; more information: https://angular.io/api/router/NavigationExtras
0
Author: Vinicius Cortez, 2020-04-14 22:16:53