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

479
Views
¿Cómo inyectar código blazor detrás del archivo .razor.cs? IJSRuntime por ejemplo

Con un componente normal de maquinilla de afeitar de una sola página en Blazor. Puedo inyectar IJSRuntime así en la parte superior de la página:

 @inject IJSRuntime JSRuntime

Si creo un código detrás del archivo .razor.cs para el componente, ¿cómo inyecto algo como IJSRuntime en el código detrás del archivo?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

En el código detrás del archivo razor.cs, IJSRunTime u otros pueden inyectarse con el atributo [Inject]

 public partial class BillingDashboard { [Inject] IJSRuntime JSRuntime { get; set; } protected override async Task MyFunction() { await JSRuntime.InvokeVoidAsync("console.log('test')"); } }
over 4 years ago · Santiago Trujillo Report
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!