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

Method open

src/aria/private/tabs/tabs.ts:281–292  ·  view source on GitHub ↗
(tab: TabPattern | undefined)

Source from the content-addressed store, hash-verified

279 /** Opens the given tab or the current active tab. */
280 open(tab?: TabPattern): boolean;
281 open(tab: TabPattern | undefined): boolean {
282 tab ??= this.activeTab();
283
284 if (tab === undefined) return false;
285
286 const success = this.expansionBehavior.open(tab);
287 if (success) {
288 this.selectedTab.set(tab);
289 }
290
291 return success;
292 }
293
294 /** Executes a navigation operation and expand the active tab if needed. */
295 private _navigate(op: () => boolean, shouldExpand: boolean = false): void {

Callers 2

TabListPatternClass · 0.95
_navigateMethod · 0.95

Calls 2

setMethod · 0.80
openMethod · 0.65

Tested by

no test coverage detected