UNPKG

1.68 kBTypeScriptView Raw
1import { NgbOffcanvasOptions } from './offcanvas-config';
2import { NgbOffcanvasRef } from './offcanvas-ref';
3import * as i0 from "@angular/core";
4/**
5 * A service for opening an offcanvas.
6 *
7 * Creating an offcanvas is straightforward: create a component or a template and pass it as an argument to
8 * the `.open()` method.
9 *
10 * @since 12.1.0
11 */
12export declare class NgbOffcanvas {
13 private _injector;
14 private _offcanvasStack;
15 private _config;
16 /**
17 * Opens a new offcanvas panel with the specified content and supplied options.
18 *
19 * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,
20 * then instances of those components can be injected with an instance of the `NgbActiveOffcanvas` class. You can then
21 * use `NgbActiveOffcanvas` methods to close / dismiss offcanvas from "inside" of your component.
22 *
23 * Also see the [`NgbOffcanvasOptions`](#/components/offcanvas/api#NgbOffcanvasOptions) for the list of supported
24 * options.
25 */
26 open(content: any, options?: NgbOffcanvasOptions): NgbOffcanvasRef;
27 /**
28 * Returns an observable that holds the active offcanvas instance.
29 */
30 get activeInstance(): import("@angular/core").EventEmitter<NgbOffcanvasRef | undefined>;
31 /**
32 * Dismisses the currently displayed offcanvas with the supplied reason.
33 */
34 dismiss(reason?: any): void;
35 /**
36 * Indicates if there is currently an open offcanvas in the application.
37 */
38 hasOpenOffcanvas(): boolean;
39 static ɵfac: i0.ɵɵFactoryDeclaration<NgbOffcanvas, never>;
40 static ɵprov: i0.ɵɵInjectableDeclaration<NgbOffcanvas>;
41}