We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code is like this
<ul class="menu"> <li class={{ navigationType === "home" ? "current-menu-item" : "" }}> <a href="/">Home</a> </li> {{-- <li class="menu-item-has-children current-menu-item"><a href="#">Company</a> --}} <li class={{ navigationType === "company" ? ["menu-item-has-children", "current-menu-item"].join(' ') : "menu-item-has-children" }}><a href="#">Company</a> <ul class="sub-menu"> <li><a href="/about">About us</a></li> <li><a href="/why-choose">Why Choose Us</a></li> <li><a href="/team">Our team</a></li>
And with this
`
<li class="menu-item-has-children" current-menu-item=""><a href="#">Company</a> <ul class="sub-menu"> <li><a href="/about">About us</a></li> <li><a href="/why-choose">Why Choose Us</a></li>`
Edge JS is rendering like this
<li class="menu-item-has-children" current-menu-item=""><a href="#">Company</a> <ul class="sub-menu"> <li><a href="/about">About us</a></li>
I also tried this
<li class={{ navigationType === "company" ? menu-item-has-children current-menu-item : "menu-item-has-children" }}><a href="#">Company</a>
<li class={{ navigationType === "company" ?
: "menu-item-has-children" }}><a href="#">Company</a>
Still having issue
The text was updated successfully, but these errors were encountered:
As you can see its rendering wrong at this <li class="menu-item-has-children" current-menu-item="">
<li class="menu-item-has-children" current-menu-item="">
it should be like <li class="menu-item-has-children current-menu-item">
<li class="menu-item-has-children current-menu-item">
Sorry, something went wrong.
Hey @gaurangmangukiya! 👋🏻
You are forgetting the " inside your HTML.
"
Taking your example:
<!-- WRONG --> <li class={{ navigationType === "home" ? "current-menu-item" : "" }}> <!-- CORRECT --> <li class="{{ navigationType === "home" ? "current-menu-item" : "" }}">
@RomainLanz Worked. Thank You...
No branches or pull requests
Code is like this
<ul class="menu"> <li class={{ navigationType === "home" ? "current-menu-item" : "" }}> <a href="/">Home</a> </li> {{-- <li class="menu-item-has-children current-menu-item"><a href="#">Company</a> --}} <li class={{ navigationType === "company" ? ["menu-item-has-children", "current-menu-item"].join(' ') : "menu-item-has-children" }}><a href="#">Company</a> <ul class="sub-menu"> <li><a href="/about">About us</a></li> <li><a href="/why-choose">Why Choose Us</a></li> <li><a href="/team">Our team</a></li>
And with this
`
Home
Edge JS is rendering like this
I also tried this
<li class={{ navigationType === "company" ?
menu-item-has-children current-menu-item: "menu-item-has-children" }}><a href="#">Company</a>
Still having issue
The text was updated successfully, but these errors were encountered: