Skip to main content

#Eee0 人がディスカッション中

Hi! I'm working on this module and I keep getting this challenge error:

Challenge not yet complete in Quick Start: Lightning Web Components

We can't find the '{name}' attribute in the selector.html file.

 

BUT - I did add the name attribute to the selector.html file, as shown. Please help. 

 

<template>     <div class="wrapper">     <header class="header">Available Bikes for {name}</header>     <section class="content">         <div class="columns">         <main class="main" >             <c-list onproductselected={handleProductSelected}></c-list>         </main>         <aside class="sidebar-second">             <c-detail product-id={selectedProductId}></c-detail>         </aside>         </div>     </section>     </div> </template>

11 件の回答
  1. 2021年8月12日 6:41

    Hi Monica,

     

    It is written as follows. Can you confirm that it was deployed?

     

    When you deploy the selector component files to your org (make sure that your deployment includes the selector files), you should see the following with your name instead of Mary Jones. You might need to refresh the page.

0/9000
5 件の回答
  1. 2023年11月10日 11:35

    hi @Sinziana Dobos you can solve this error by following steps first go to manage playground delete all the playground expect the one one you are using for this challenge in your case its (MY TRAILHEAD PLAYGROUND 1) then go to vs code then again author org then deploy in default org then come back to challenge page, click on  3 dots present side of the playground you will see the another playground expect the one your using select that and connect the org then verify the challenge .  

0/9000
7 件の回答
  1. 2023年10月10日 13:31

    @Harsh Singh

    Please replace these code 

      Selector.html 

     

    <template>

        <div class="wrapper">

        <header class="header">Available Bikes for {name}</header>

        <section class="content">

            <div class="columns">

            <main class="main" >

                <c-list onproductselected={handleProductSelected}></c-list>

            </main>

            <aside class="sidebar-second">

                <c-detail product-id={selectedProductId}></c-detail>

            </aside>

            </div>

        </section>

        </div>

    </template>

     

    selector.css

     

    body {

      margin: 0;

    .wrapper{

      min-height: 100vh;

      background: #ccc;

      display: flex;

      flex-direction: column;

    }

    .header, .footer{

      height: 50px;

      background: rgb(255, 255, 255);

      color: rgb(46, 46, 46);

      font-size: x-large;

      padding: 10px;

    }

    .content {

      display: flex;

      flex: 1;

      background: #999;

      color: #000; 

    }

    .columns{

      display: flex;

      flex:1;

    }

    .main{

      flex: 1;

      order: 2;

      background: #eee;

    }

    .sidebar-first{

      width: 20%;

      background: #ccc;

      order: 1;

    }

    .sidebar-second{ 

      width: 30%;

      order: 3;

      background: #ddd;

    }

     

    selector.js-meta.xml

     

    <?xml version="1.0" encoding="UTF-8"?>

    <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

        <apiVersion>48.0</apiVersion>

        <isExposed>true</isExposed>

        <targets>

            <target>lightning__AppPage</target>

            <target>lightning__RecordPage</target>

            <target>lightning__HomePage</target>

        </targets>

    </LightningComponentBundle>

0/9000
2 件の回答
  1. 2023年10月10日 13:33

      Selector.html 

     

    <template>

        <div class="wrapper">

        <header class="header">Available Bikes for {name}</header>

        <section class="content">

            <div class="columns">

            <main class="main" >

                <c-list onproductselected={handleProductSelected}></c-list>

            </main>

            <aside class="sidebar-second">

                <c-detail product-id={selectedProductId}></c-detail>

            </aside>

            </div>

        </section>

        </div>

    </template>

     

    selector.css

     

    body {

      margin: 0;

    .wrapper{

      min-height: 100vh;

      background: #ccc;

      display: flex;

      flex-direction: column;

    }

    .header, .footer{

      height: 50px;

      background: rgb(255, 255, 255);

      color: rgb(46, 46, 46);

      font-size: x-large;

      padding: 10px;

    }

    .content {

      display: flex;

      flex: 1;

      background: #999;

      color: #000; 

    }

    .columns{

      display: flex;

      flex:1;

    }

    .main{

      flex: 1;

      order: 2;

      background: #eee;

    }

    .sidebar-first{

      width: 20%;

      background: #ccc;

      order: 1;

    }

    .sidebar-second{ 

      width: 30%;

      order: 3;

      background: #ddd;

    }

     

    selector.js-meta.xml

     

    <?xml version="1.0" encoding="UTF-8"?>

    <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

        <apiVersion>48.0</apiVersion>

        <isExposed>true</isExposed>

        <targets>

            <target>lightning__AppPage</target>

            <target>lightning__RecordPage</target>

            <target>lightning__HomePage</target>

        </targets>

    </LightningComponentBundle>

0/9000