UNPKG

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