arkon / ng-sidebar

[Inactive] Angular sidebar component.

Home Page:https://echeung.me/ng-sidebar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't nest components inside ng-sidebar

gabriel-gn opened this issue · comments

Is it possible to put components inside ng-sidebar-content?
I've been trying without success...

ng-sidebar seems to seems to always push content of app-content.
Below my code.

<ng-sidebar #sidebar >
    <div ng-sidebar-content>
       <app-content></app-content>
    </div>
</ng-sidebar-container>
commented

Are you sure your code is right? It seems to be missing the opening tag for the container and the closing tag for the sidebar.

Sorry, my code is a bit messy. Below it more readable:

<app-navbar></app-navbar>
<ng-sidebar-container style="height: 100vh;">

    <ng-sidebar #sidebar 
    [opened]="sidebarOpened" 
    [dock]="true" 
    [dockedSize]="'40px'" 
    [mode]="'push'"
    [position]="'left'"
    [closeOnClickOutside]="false">
    <!-- Sidebar content  -->
   </ng-sidebar>

   <div ng-sidebar-content>
      <app-content></app-content>
    </div>
  
</ng-sidebar-container>
commented

It's hard to tell without actually being to see the site. Your best bet would be poking around in dev tools to see why it's pushing things.

Thanks. I'll try to debug it, it's probably not a problem with the module