I have a navmenu.html that has a dropdown. I wanted to be able to add a divider as part of the dropdown options. I asked a question on SO and received this answer which I thought would work.
However upon changing the <li></li> component to this:
<li repeat.for="menu of route.settings.nav" class=${menu.navSettings.divider ? 'divider' : 'dropdown-submenu'}>
I am getting warnings on both options of that class ternary operator.
Missing attribute name.
…and it now doesn’t render the next level of menu items. Its like the ternary operator is not working.
I don’t think I can use a if.bind for this as its the
for the repeat statement
Is there a way of testing whether a value exists in settings (as I am doing) and if so, change the class to a different value as a result?