src/modules/app-sidebar/services/app-sidebar.service.intf.ts
Stark Sidebar Service.
Properties |
Methods |
close |
close()
|
Close all sidebars
Returns :
void
|
openLeft |
openLeft()
|
Open the left sidebar
Returns :
void
|
openMenu |
openMenu()
|
Open sidebar's menu
Returns :
void
|
openRight |
openRight()
|
Open the right sidebar
Returns :
void
|
toggleMenu |
toggleMenu()
|
Toggle sidebar's menu
Returns :
void
|
closeSidebar$ |
closeSidebar$:
|
Type : Observable<void>
|
Observable subscribed by components to catch close events |
openSidebar$ |
openSidebar$:
|
Type : Observable<StarkAppSidebarOpenEvent>
|
Observable subscribed by components to catch open events |
toggleSidebar$ |
toggleSidebar$:
|
Type : Observable<StarkAppSidebarOpenEvent>
|
Observable subscribed by components to catch toggle events |
import { Observable } from "rxjs";
import { StarkAppSidebarOpenEvent } from "./app-sidebar-open-event.intf";
import { InjectionToken } from "@angular/core";
/**
* @ignore
*/
export const starkAppSidebarServiceName = "StarkAppSidebarService";
/**
* {@link https://v12.angular.io/api/core/InjectionToken|InjectionToken} used to provide the {@link StarkAppSidebarService}
*/
export const STARK_APP_SIDEBAR_SERVICE: InjectionToken<StarkAppSidebarService> = new InjectionToken<StarkAppSidebarService>(
starkAppSidebarServiceName
);
/**
* Stark Sidebar Service.
*/
export interface StarkAppSidebarService {
/**
* Observable subscribed by components to catch close events
*/
closeSidebar$: Observable<void>;
/**
* Observable subscribed by components to catch open events
*/
openSidebar$: Observable<StarkAppSidebarOpenEvent>;
/**
* Observable subscribed by components to catch toggle events
*/
toggleSidebar$: Observable<StarkAppSidebarOpenEvent>;
/**
* Close all sidebars
*/
close(): void;
/**
* Open sidebar's menu
*/
openMenu(): void;
/**
* Open the left sidebar
*/
openLeft(): void;
/**
* Open the right sidebar
*/
openRight(): void;
/**
* Toggle sidebar's menu
*/
toggleMenu(): void;
}