• Kurt Fairfield
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Principal Engineer
  • FESI

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Can anyone tell me why I need to surround this property bind with a second template tag with directive to make this simple component render on the Account record page. Basically, if I remove the inner template tag, or even just it's directive, the component doesn't render at all (also caused other LWC custom components on the page to also not render)

HTML (works)
<!-- Template Syntax Test -->
<template>
    <template if:true={account.data}>
        <p>Account Name is {name}</p>
    </template>
</template>
JS
import {LightningElement, wire, api} from 'lwc';
import {getRecord} from 'lightning/uiRecordApi';

const
    FIELDS = [
        'Account.Name'
    ];

export default class TemplateSyntaxTest extends LightningElement {
    @api recordId;

    @wire(getRecord, {recordId: '$recordId', fields: FIELDS})
    account;

    get name() {
        return this.account.data.fields.Name.value;
    }
}
The following HTML does not render anything at all...
<!-- Template Syntax Test -->
<template>
    <p>Account Name is {name}</p>
</template>
Any ideas?
 
I have built the reports and dashboards as outlined in the requirements, but I'm getting the following error "Challenge Not yet complete... here's what's wrong: Couldn't find a component with the title 'My Top Accounts'."  
User-added image

However, I have the component on the dashboard as you can see below.
User-added image
What am I missing?