An open API service indexing awesome lists of open source software.

https://github.com/pkief/vscode-angular-component-extractor

VS Code Extension to extract HTML Code into Angular components
https://github.com/pkief/vscode-angular-component-extractor

angular html vscode vscode-extension

Last synced: 5 months ago
JSON representation

VS Code Extension to extract HTML Code into Angular components

Awesome Lists containing this project

README

          




logo



Angular Component Extractor




Extract Angular Components based on editor selection

## Description

This extension for VS Code makes it easier to split components in an Angular project. Within a template you can select the part which should be extracted. Then another component is generated in the same directory using the Angular CLI.

## How to use

![Preview](./images/preview.gif)

## Configuration

Angular generates components with a prefix. This prefix can be customized via VS Code settings:

```json
{
"angular-component-extractor.default-prefix": "app"
}
```

## Angular CLI

The extension is using [Angular CLI](https://angular.io/cli) under the hood. If the CLI is not installed it will execute it via NPX. In general, it's recommended to install the Angular CLI on the system to get a better performance of this extension:

```
npm install -g @angular/cli
```

## Feedback

As this extension is quite new on the VS Code Marketplace it would be nice if you could leave us some feedback. In case of any issues let us know of that and [create an issue](https://github.com/PKief/vscode-angular-component-extractor/issues/new) in the repository. Further suggestions and ideas are also welcome in a [discussion](https://github.com/PKief/vscode-angular-component-extractor/discussions).