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

104
Views
Cómo leer la propiedad de una clase exportada no predeterminada en el componente Lightning

Estoy aprendiendo sobre Lightning Web Component LWC. Quiero exportar más de una clase en el mismo componente y usar una propiedad declarada en una clase de exportación diferente a la predeterminada en el mismo componente web. Veamos código de ejemplo:

 App.html <template> <div id="waiting" if:false={ready}>Loading…</div> <div id="display" if:true={ready}> **<div>Name: {AdditionalClass.name}</div>** <div>Description: {description}</div> <lightning-badge label={category}></lightning-badge> <lightning-badge label={material}></lightning-badge> <div>Price: {price}</div> <div><img src={pictureUrl}/></div> </div>

y vea el archivo .js:

 App.js import { LightningElement } from 'lwc'; export default class MyBikeasdasf extends LightningElement { name = 'Electra X4'; description = 'A sweet bike built for comfort.'; category = 'Mountain'; material = 'Steel'; price = '$2,700'; pictureUrl = 'https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/electrax4.jpg'; ready = false; connectedCallback() { setTimeout(() => { this.ready = true; }, 3000); } } export class AdditionalClass extends LightningElement { name = 'CUSTOM ITEM'; }

¿Cómo se puede usar un nombre de propiedad de AdditionalClass en App.html ?

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!