huanguolin / ng-helper

The Perfect Assistant for Angular.js with TypeScript Development.
https://marketplace.visualstudio.com/items?itemName=huanguolin.ng-helper
Other
2 stars 0 forks source link
angularjs vscode-extension

ng-helper - The Perfect Assistant for Angular.js with TypeScript Development

lint & tsc & unit-test

中文文档

ng-helper enhances the efficiency of Angular.js development, especially when used with TypeScript. It provides convenient features such as auto-completion for ng-* directives and data binding in HTML, hover type hints, injection validation in ts files, right-click context menu for creating components, and more.

demo

Features

Useful utilities features:

  • [x] Jump from 'templateUrl' to the corresponding HTML (see demo)
  • [x] ✨🆕 Jump from 'controller' name to the implement js/ts file (see demo)
  • [x] ✨🆕 Click to search for 'directive'/'component' where to use (see demo)
  • [x] Right-click menu to create components (see demo)

Requirements

Installation

  1. Install the extension
  2. Create an empty ng-helper.json file in the .vscode directory of your workspace(This file is a plugin startup flag, without which the plugin will not start)
  3. Restart vscode

Extension Settings

Create an empty ng-helper.json file in the .vscode directory of your workspace. It supports the following configuration:

Known Issues

When using feature like auto-completion in the html template, it may not work if no ts/js file has been opened for preview after the project is opened. This can cause the TypeScript language service to not start, resulting in no auto-completion. In this case, an warning message will pop up in the lower right corner. Click OK, and a ts/js file will automatically open. After that, return to the HTML file, and the auto-completion should work normally.