Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show sidebar by default #164

Open
tkoseoglu opened this issue Mar 2, 2017 · 1 comment
Open

Show sidebar by default #164

tkoseoglu opened this issue Mar 2, 2017 · 1 comment

Comments

@tkoseoglu
Copy link

Hi,
If I wanted to show a sidebar by default, what would I need to do?
Thanks
--tolga

@willwolfram18
Copy link

Assuming normal sidebar behavior, your angular component could implement AfterViewInit and using an @ViewChild(SemanticSidebarComponent) you could call .show().

import { Component, AfterViewInit } from "@angular/core";
import { SemanticSidebarComponent } from "ng-semantic";

@Component({/* Component data here */})
export class AppComponent
{
    @ViewChild(SemanticSidebarComponent)
    sidebar: SemanticSidebarComponent;

    ngAfterViewInit()
    {
        this.sidebar.show();
    }
}

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

No branches or pull requests

2 participants