docs(angular): adds docs to angular API (#17211)

This commit is contained in:
Manu MA
2019-01-22 20:03:47 +01:00
committed by GitHub
parent d3b6e60adf
commit a7a2fc59bf
5 changed files with 165 additions and 14 deletions

View File

@ -3,14 +3,23 @@ import { proxyMethod } from './util';
export class OverlayBaseController<Opts, Overlay> {
constructor(private ctrl: string) {}
/**
* Creates a new overlay
*/
create(opts?: Opts): Promise<Overlay> {
return proxyMethod(this.ctrl, 'create', opts);
}
/**
* When `id` is not provided, it dismisses the top overlay.
*/
dismiss(data?: any, role?: string, id?: string): Promise<void> {
return proxyMethod(this.ctrl, 'dismiss', data, role, id);
}
/**
* Returns the top overlay.
*/
getTop(): Promise<Overlay> {
return proxyMethod(this.ctrl, 'getTop');
}