Hello,
I’m working on a project in which I need to create multiple tabs after a button click. The button click to create these tabs is inside another tab content. I created a ModalComponent popup in which I stick in my tabs template. So far, everything works ok, but the issue I’m having is when I click on one of the tabs to view its content, its displays in its parent tab.
Below is the scenario:
- Parent tabs
> <ul>
<li> {{#link-to "tab1"}} Tab 1 {{/link-to}} </li> <li> {{#link-to "tab2"}} Tab 2 {{/link-to}} </li> <li> {{#link-to "tab3"}} Tab 3 {{/link-to}} </li> </ul> <div> {{outlet}} </div>
- Child tabs. Note: these child tabs are created by clicking on button inside the “Tab 2” above.
> <ul>
<li> {{#link-to "tab4"}} Tab 4 {{/link-to}} </li> <li> {{#link-to "tab5"}} Tab 5 {{/link-to}} </li> <li> {{#link-to "tab6"}} Tab 6 {{/link-to}} </li> </ul> <div> {{outlet}} </div>
Issue: The content of my child tabs display inside my “Tab 2” content. What I would want is to have the content of the child tabs to display in its child “outlet” and not in its parent outlet.
After trying out multiple things and researching online, I still haven’t figured out how to do this.
Any help will be appreciated!
Thanks