MCPcopy Create free account
hub / github.com/angular/components / getId

Method getId

src/material/dialog/testing/dialog-harness.ts:50–55  ·  view source on GitHub ↗

Gets the id of the dialog.

()

Source from the content-addressed store, hash-verified

48
49 /** Gets the id of the dialog. */
50 async getId(): Promise<string | null> {
51 const id = await (await this.host()).getAttribute('id');
52 // In case no id has been specified, the "id" property always returns
53 // an empty string. To make this method more explicit, we return null.
54 return id !== '' ? id : null;
55 }
56
57 /** Gets the role of the dialog. */
58 async getRole(): Promise<DialogRole | null> {

Callers 7

MatDialogTitleClass · 0.45
openMethod · 0.45
datepicker-base.tsFile · 0.45
MatDateRangeInputClass · 0.45
MatCalendarHeaderClass · 0.45
constructorMethod · 0.45

Calls 1

getAttributeMethod · 0.65

Tested by

no test coverage detected