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

Method open

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

Source from the content-addressed store, hash-verified

275 /** Opens the given tab or the current active tab. */
276 open(tab?: TabPattern): boolean;
277 open(tab: TabPattern | undefined): boolean {
278 tab ??= this.activeTab();
279
280 if (tab === undefined) return false;
281
282 const success = this.expansionBehavior.open(tab);
283 if (success) {
284 this.selectedTab.set(tab);
285 }
286
287 return success;
288 }
289
290 /** Executes a navigation operation and expand the active tab if needed. */
291 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