Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

first open not work properly #67

Closed
ninomirabile opened this issue Apr 13, 2017 · 4 comments
Closed

first open not work properly #67

ninomirabile opened this issue Apr 13, 2017 · 4 comments

Comments

@ninomirabile
Copy link

ninomirabile commented Apr 13, 2017

my component.ts

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-sidebar',
  templateUrl: './sidebar.component.html',
  styleUrls: ['./sidebar.component.css']
})
export class SidebarComponent  {

  headerLogoImage : string;

  constructor() {
    this.headerLogoImage = './src/app/imgPath/fuel.svg'
   }

  private _opened: boolean = true;
  private _autoCollapseWidth: number = 500;
  private _autoCollapseHeight: number = 500;
  private _closeOnClickOutside: boolean = true;
  private _showBackdrop: boolean = true;  
  

  private _toggleSidebar() {
    this._opened = !this._opened;    
  }
}

my template

<ng-sidebar-container>

      <!-- A sidebar -->
      <ng-sidebar
       [(opened)]="_opened"
       [mode]="'push'"
       [autoCollapseHeight]="_autoCollapseHeight"
       [autoCollapseWidth]="_autoCollapseWidth"
       [closeOnClickOutside]="_closeOnClickOutside"
       [showBackdrop]="_showBackdrop">
        <ul>
            <li>home</li>
            <li>prezzi</li>
            <li>carico</li>
            <li>contatori</li>
            <li>fatture</li>
            <li>impostazioni</li>
        </ul>
    
      </ng-sidebar>
</ng-sidebar-container>

when i run the first time the _opened works but it take all page size and backdrop not works. if i close and open -> sidebar works correctly.

@arkon
Copy link
Owner

arkon commented Apr 13, 2017

Did you put it inside an <ng-sidebar-container>?

@arkon arkon added the support label Apr 13, 2017
@ninomirabile
Copy link
Author

my complete template

cattura

@arkon arkon added the bug label Apr 13, 2017
@arkon
Copy link
Owner

arkon commented Apr 13, 2017

I just published v4.1.1, which should at least fix the backdrop not showing the first time. I'm not sure what the page size issue is though, that could be related to your specific content and styles.

@ninomirabile
Copy link
Author

yes, i try sidebar in a simple test project, size is correct. thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants