# AngularParser

**Kind:** Class

**Source:** [`atloria-monorepo/apps/frontend-parser/src/parsers/angular.parser.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/frontend-parser/src/parsers/angular.parser.ts#L61)

**Implements:** `IParser`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `initialize` | `initialize(config: ParserConfig)` | `Promise<void>` |
| `canParse` | `canParse(filePath: string)` | `boolean` |
| `parseFile` | `parseFile(filePath: string, content: string)` | `Promise<ParseResult>` |
| `parseFiles` | `parseFiles(files: ParseFileInput[])` | `Promise<ParseResult[]>` |
| `destroy` | `destroy()` | `Promise<void>` |

## Properties

| Property | Type |
|---|---|
| `name` | `string` |
| `version` | `string` |
| `supportedPatterns` | `string[]` |

## Where it refuses work

- `AngularParser` stops the work with `Error` when `!this.project` — “Parser not initialized. Call initialize() first.”.
- `AngularParser` stops the work with an early return when `!name`, in 4 places.
- `AngularParser` stops the work with an early return when `!this.canParse(filePath)`.
- `AngularParser` stops the work with an early return when `!fileContent.trim()`.
- `AngularParser` stops the work with an early return when `jsDocs.length > 0`.

## When something fails

- `AngularParser` handles failure in 1 place: it turns it into a return value in all 1.
