Hi everybody. I am trying to create a navigational dropdown menu in aurelia but so far no luck. I tried it wit adding a setting to the route and when that setting was true a drop down was being generated. This is sort of working but the downside of this is that I’m losing control over the order of the menu. Because it first loops over the items without the setting. And next it loops over the items with the setting. And offcourse in reallity I want to use them both together.
Is somebody aware of a best practice of creating a dropdown menu of does somebody have the golden tip?! I’m all ears .
@NvdGoorbergh I never had issues with order but I haven’t worked through setting the activation status. Part of this would depend on what your menu looks like, I used standard Bootstrap 4. What I did was create a dummy item for the main heading and then when I hit that item I would output its children. Here is how I configured the map:
it looks like what I had with some small changes (which could make a big difference!).
I had 2 repeat for’s which, now that I take a better look at it, will make it so that first all the not dropdown items are placed and then the dropdown items are placed.
Thanks, will let you know if that solves the issue!
hmm… im getting there but this solution breaks the navigation inside de dropdown.
SyntaxError: expected expression, got ‘<’
TypeError: target is undefined
I think it has something to do with the module id being #.