Skip to content

extractTabsFromTemplate

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/utils/tab-extractor.ts

Extract tab definitions from an HTML/template string.

Uses htmlparser2 to parse the template and walks the DOM tree looking for known tab-group patterns across Angular, React, and Vue frameworks.

Signature

ts
function extractTabsFromTemplate(templateContent: string, filePath: string, componentName: string, framework: 'angular' | 'vue' | 'react'): TabDefinition[]

Parameters

NameType
templateContentstring
filePathstring
componentNamestring
framework`'angular'

Returns: TabDefinition[]

Was this page helpful?

Download as PDF