Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
Cómo usar el componente del cargador al cambiar otro idioma

Quiero compartir con ustedes mi código, porque quiero llamar al componente del cargador cuando estoy cambiando de idioma.

Aquí está app.component.html

 <div class="row sol"> <angular-loader></angular-loader> <main id="contenutoprincipale" class="col-xs-12 col-sm-8 col-lg-9"> <div class="dropdown-language"> <label>{{'GENERALE.LINGUA' | translate }}</label> <select #langSelect (change)="translate.use(langSelect.value)" class="lang-style"> <option *ngFor="let lang of translate.getLangs()" [value]="lang" [selected]="lang === translate.currentLang">{{ lang }}</option> </select> </div> <router-outlet></router-outlet> </main> </div>

En app.component.ts tengo este código simple:

 translate.addLangs(commonEnvironment.availableLanguages); translate.setDefaultLang(commonEnvironment.defaultLanguage); const browserLang = translate.getBrowserLang(); translate.use(browserLang.match(/en/) ? browserLang : 'en');

en angular-loader tengo este código:

 export class LoaderComponent implements OnInit { show = false; private subscription: Subscription; constructor(private loaderService: LoaderService) { } ngOnInit() { this.subscription = this.loaderService.loaderState.subscribe( (state: LoaderState) => { if (state.queue.length > 0) { this.show = true; } else { this.show = false; } }); } }

Mi pregunta es ¿cómo llamar al módulo cargador cuando cambio otro idioma?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!