本文整理匯總了TypeScript中@fuse/components/sidebar/sidebar.service.FuseSidebarService.getSidebar方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.FuseSidebarService.getSidebar方法的具體用法?TypeScript service.FuseSidebarService.getSidebar怎麽用?TypeScript service.FuseSidebarService.getSidebar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@fuse/components/sidebar/sidebar.service.FuseSidebarService
的用法示例。
在下文中一共展示了service.FuseSidebarService.getSidebar方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnInit
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void
{
// Load the contacts
this._chatPanelService.loadContacts().then(() => {
this.contacts = this._chatPanelService.contacts;
this.user = this._chatPanelService.user;
});
// Subscribe to the foldedChanged observable
this._fuseSidebarService.getSidebar('chatPanel').foldedChanged
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((folded) => {
this.sidebarFolded = folded;
});
}
示例2: toggleSidebar
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Toggle sidebar
*
* @param name
*/
toggleSidebar(name): void
{
this._fuseSidebarService.getSidebar(name).toggleOpen();
}
示例3: toggleSidebarOpen
/**
* Toggle sidebar opened status
*/
toggleSidebarOpen(): void
{
this._fuseSidebarService.getSidebar('chatPanel').toggleOpen();
}
示例4: unfoldSidebarTemporarily
/**
* Unfold the sidebar temporarily
*/
unfoldSidebarTemporarily(): void
{
this._fuseSidebarService.getSidebar('chatPanel').unfoldTemporarily();
}
示例5: toggleSidebarFolded
/**
* Toggle sidebar folded status
*/
toggleSidebarFolded(): void
{
this._fuseSidebarService.getSidebar('navbar').toggleFold();
}
示例6: toggleSidebarOpened
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Toggle sidebar opened status
*/
toggleSidebarOpened(): void
{
this._fuseSidebarService.getSidebar('navbar').toggleOpen();
}
示例7:
.subscribe(() => {
if ( this._fuseSidebarService.getSidebar('navbar') )
{
this._fuseSidebarService.getSidebar('navbar').close();
}
}
示例8: toggleSidebarOpen
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
/**
* Toggle sidebar open
*
* @param key
*/
toggleSidebarOpen(key): void
{
this._fuseSidebarService.getSidebar(key).toggleOpen();
}