Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use new directives lwc:if, lwc:elseif, lwc:else #149

Open
jefersonchaves opened this issue Mar 13, 2023 · 5 comments
Open

Unable to use new directives lwc:if, lwc:elseif, lwc:else #149

jefersonchaves opened this issue Mar 13, 2023 · 5 comments

Comments

@jefersonchaves
Copy link

Describe the bug
Local development tool fails to load components using the new lwc:if, lwc:elseif, or lwc:else to Render DOM Elements Conditionally.
Error: Invalid directive "$lwc:if" on element <template>..

To Reproduce
Steps to reproduce the behavior:

  1. Create a component simple as:
<template>
    <template lwc:if={_isLoading}>Loading</template>
    <template lwc:else>
        Display data loaded
   </template> 
</template>
  1. Save.

Expected behavior
The conditional display of elements as if it was deployed to Salesforce.

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS Ventura 13.2.1
  • Browser: Chrome
  • Version 111.0.5563.64 (Official Build) (arm64)

Additional context
The browser is irrelevant.

@jsmithdev
Copy link

jsmithdev commented Mar 22, 2023

Updated sfdx and plugins but same issue. Hopefully we can start using new directives over if:true etc soon 🤞

Error: LWRPLUGIN_ERROR: Invalid directive "$lwc:if" on element <template>.

Plug in version: @salesforce/lwc-dev-server 2.11.0

SFDX version: sfdx-cli/7.192.2 linux-x64 node-v18.14.1

@stale
Copy link

stale bot commented Apr 2, 2023

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

@stale stale bot added the type:bug-p3 label Apr 2, 2023
@RaviVaranasi
Copy link

Are there any plans on supporting this for local dev server development?

@stale stale bot removed the type:bug-p3 label Apr 18, 2023
@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

@petter-eikeland
Copy link

It would be really good if this plugin could be maintained. It has great potential to dramatically increase Developer Productivity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants