Giter Club home page Giter Club logo

angular-extension-pack's Introduction

Angular Extension Pack

This extension pack packages some of the most popular (and some of my favorite) Angular extensions. If you like it, please leave your Rating & Review and share with your friends. If you know any extension that is good for Angular development, just let me know by creating an issue.

Extensions Included

Angular-specific Tools

  • Angular Language Service
    • This a MUST extension for your Angular development.
    • It provides a rich editing experience for Angular templates such as IntelliSense (Completions lists), Quick info, Go to definition ( F12 ) and AOT Diagnostic messages.
  • Angular Schematics
    • Angular schematics (CLI commands) from files Explorer or Command Palette.
  • angular2-switcher
    • Remember to use Alt+o shortcut to switch between Component and the HTML Template.

Angular Code Snippets

  • Angular Snippets (Version 16)

    • Let's highlight some of my favorite code snippets that works very well with Angular CLI:
      • HTML Snippets
        • a-class: [class] binding
        • a-style: [style] binding
        • a-ngClass: ngClass
        • a-ngStyle: ngStyle
        • a-ngSwitch: ngSwitch
        • a-select: <select> control
        • a-ngFor: *ngFor
        • a-ngForAsync: *ngFor with async
        • a-ngFor-trackBy: *ngFor with trackBy
        • a-ngIf: *ngIf
        • a-ngIfElse: *ngIf with else
        • a-ngModel: ngModel
        • a-formControlName: formControlName
        • a-formGroup: formGroup
        • a-formGroupName: formGroupName
        • a-routerLink: routerLink (include routerLinkActive)
        • a-routerLink-param: routerLink with a route parameter (include routerLinkActive)
        • a-prej: show the JSON form of a model
        • a-preja: show the JSON form of a model, using async
      • TypeScript snippets
        • RxJS
          • a-rxjs-import: import RxJs features (e.g. Observable, of, Subject)
          • a-rxjs-operator: import RxJs opertors (e.g. map, tap, catchError)
          • a-pipe: pipe
        • HttpClient
          • a-httpclient-get: httpClient.get with Rx Observable
          • a-http-interceptor: Empty Angular HttpInterceptor for HttpClient
          • a-http-interceptor-headers: Angular HttpInterceptor that sets headers for HttpClient
          • a-http-interceptor-logging: Angular HttpInterceptor that logs traffic for HttpClient
          • a-service-httpclient: service with HttpClient
        • Routes
          • a-route-path-404: 404 route path
          • a-route-path-lazy: lazy route path
          • a-route-path-default: default route path
          • a-route-path-with-children: route path with children
          • a-route-path-eager: eager route path
          • a-route-path-lazy: lazy route path
          • a-router-events: listen to one or more router events
          • a-route-params-subscribe: subscribe to route parameters
        • Route Guards
          • a-guard-can-load: CanLoad guard
          • a-guard-can-activate: CanActivate guard
          • a-guard-can-activate-child: CanActivateChild guard
          • a-guard-can-deactivate: CanDeactivate guard
        • Misc
          • a-preload-strategy: implements PreloadingStrategy class
          • a-output-event: @Output event and emitter
      • JavaScript snippets
        • ex-simple-server: Node.js Express Server
      • Dockerfile snippets
        • docker-angular-node-multi-stage: Multi-stage Dockerfile for Node with Angular
  • Angular 10 Snippets - TypeScript, Html, Angular Material, ngRx, RxJS & Flex Layout

    • Setting: "editor.snippetSuggestions": "top"
      • Let default/user/extension snippets are on top of your suggestion list.
    • Snippet Prefixes
      • t- (Test Snippets)
      • e- (Test Expect Snippets)
      • ng- (Angular Snippets)
      • fx- (Angular Flex Layout Snippets)
      • m- (Angular Material Design Snippets)
      • rx- (RxJS Snippets for both TypeScript and JavaScript)
      • sw- (Service Workers Snippets)
      • pwa- (Progressive Web Applications Snippets)
      • ngrx- (Angular NgRx Snippets)
      • ngxs- (Angular NGXS Snippets)
  • Some notes about importing RxJS stuff

    • Try RxJS Explorer to learn more!
    • In RxJS 6+, there are only 2 kinds of pattern to import things.
      • import { Observable } from 'rxjs';
        • import everything that is a Type, Creation methods, Scheduler, Helper from rxjs!
      • import { map } from 'rxjs/operators';
        • all of the operators get imported from rxjs/operators!

TypeScript Productivity

  • Auto Import
  • JavaScript (ES6) code snippets
    • Import and export
      • imp→ imports entire module import fs from 'fs';
      • imn→ imports entire module without module name import 'animate.css'
      • ime→ imports everything as alias from the module import * as localAlias from 'fs';
      • imd→ imports only a portion of the module using destructing import { rename } from 'fs';
      • ima→ imports only a portion of the module as alias import { rename as localRename } from 'fs';
      • enf→ exports name function export const log = (parameter) => { console.log(parameter);};
      • edf→ exports default function export default (parameter) => { console.log(parameter);};
      • ecl→ exports default class export default class Calculator { };
      • ece→ exports default class by extending a base one export default class Calculator extends BaseClass { };
    • Class helpers
      • con→ adds default constructor in the class constructor() {}
      • met→ creates a method inside a class add() {}
      • pge→ creates a getter property get propertyName() {return value;}
      • pse→ creates a setter property set propertyName(value) {}
    • Various methods
      • fre→ forEach loop in ES6 syntax array.forEach(currentItem => {})
      • fof→ for ... of loop for(let item of object) {}
      • fin→ for ... in loop for(let item in object) {}
      • anfn→ creates an anonymous function (params) => {}
      • nfn→ creates a named function const add = (params) => {}
      • sti→ set interval helper method setInterval(() => {});
      • sto→ set timeout helper method setTimeout(() => {});
      • prom→ creates a new Promise return new Promise((resolve, reject) => {});
      • thenCatch→ adds then and catch declaration to a promise .then((res) => {).catch((err) => {});
    • Console methods
      • clg→ console log console.log(object)
      • cdi→ console dir console.dir
      • clt→ console table console.table
  • refactorix
    • Some of the Toggle access modifier are awesome:
      • x: Add semicolons ( There is so convenient shortcut: Ctrl+; )
      • x: Remove semicolons ( There is so convenient shortcut: Ctrl+Shift+; )
      • x: Property to getter/setter
      • x: Arrow function all single statement blocks to expression
  • Paste JSON as Code (Refresh)
    • quicktype infers types from sample JSON data, then outputs strongly typed models and serializers for working with that data in your desired programming language. For more explanation, read A first look at quicktype.
    • It supports C#, Go, C++, Java, TypeScript, Swift, Elm, and JSON Schema. I have to say THIS IS AWESOME! Just try it.
  • Document This
    • Remember to hit Ctrl+Alt+D and hit Ctrl+Alt+D again (hit twice) to generates documentation.

Template Productivity

  • Enable VSCode built-in Linked Editing (Auto update tags) feature.

    "editor.linkedEditing": true

Code Analysis

Workbench

  • EditorConfig for VS Code
    • You can right-click on any folder in the EXPLORER pane and choose Generate .editorconfig command.
  • Todo Tree
    • TODO Tree just did an amazing job for highlighting the TODO's in the source code.
    • It can aggregate all the TODO's in the project into sidebar.
    • All the colors can be customized. New comment tags can be customized as well.

Some other extensions you may need (Optional)

You need to install the following extensions manually.

Other manual setup (Optional)

Snippets Included

This extension contains supplementary code snippets to Angular Snippets (Version 12) & Angular 10 Snippets - TypeScript, Html, Angular Material, ngRx, RxJS & Flex Layout.

TypeScript snippets

  • main.ts (Standalone component)
    • ng-import-provideHttpClient: imports provideHttpClient from @angular/common/http
  • main.ts
    • ng-bootstrapModule-NoopZone: Setting up NoopZone in main.ts
  • polyfills.ts
    • ng-polyfills-zonejs-flags: Setting up Zone.js flags
  • app.module.ts (Angular Module)
    • ng-import-FormsModule: imports FormsModule from @angular/forms
    • ng-import-ReactiveFormsModule: imports ReactiveFormsModule from @angular/forms
    • ng-import-HttpClientModule: imports HttpClientModule from @angular/common/http
    • ngDoBootstrap: generates ngDoBootstrap() method for AppModule
  • app.module.ts (Angular Elements)
    • ng-import-element: imports createCustomElement and Injector for Angular Elements
    • ng-elements: create required Angular Elements boilerplate on AppModule
    • ng-import-LazyElementsModule: imports LazyElementsModule from @angular-extensions/elements

HTML snippets

  • a-ngSubmit: Angular Forms's ngSubmit event
  • a-formArrayName: Angular formArrayName
  • a-formGroupName: Angular formGroupName
  • a-routerLinkActive: Angular routerLinkActive="active"
  • a-routerLinkActiveOptions: Angular [routerLinkActiveOptions]="{exact: true}"
  • a-axLazyElement: Lazy load Angular Elements or any other web components / custom elements

NGINX snippets

  • ng-nginx: NGINX configuration for Angular (nginx.conf)

Dockerfile snippets

  • ng-dockerfile: Multi-stage build for Angular and Nginx Dockerfile
    • In this snippet, you can choose between ng build or npm run build -- command.

Enjoy!

angular-extension-pack's People

Contributors

cyrilletuzi avatar doggy8088 avatar sandy081 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-extension-pack's Issues

Plan to remove the following extensions

I plan to remove the following extensions:

  • AngularDoc for Visual Studio Code
    • Reason: Not always needed. It can be installed when needed.
  • Git Lens
    • Reason: It's too informative and most of the time are not needed. It should be installed when needed.
  • TypeScript Toolbox
    • Reason: The auto import feature is buggy and nobody fix it for monthes.

Guides

-- Description
Extension Guides
Description An extension for more guide lines
Publisher spywhere
Website https://github.com/spywhere/vscode-guides
Reason It provide more then built-in indent guideline such as Stack and Active indentation guides, Indentation backgrounds, Color and style customizations, Hide on selection, etc.
Precondition N/A

Quokka.js

-- Description
Extension Quokka.js
Description The Live Scratchpad for JavaScript
Publisher Wallaby.js
Website https://quokkajs.com
Reason It is a rapid prototyping playground in your editor, with access to your project's files, inline reporting, code coverage and rich output formatting.

請協助新增 Snippet

目前在 VS Code 中,無法於 Template 中使用 ngSubmit、formArrayName、formGroupName 的 Snippet,煩請協助新增,感謝!

Can karma-problem-matcher extension be included?

-- Description
Extension karma-problem-matcher
Description Capture errors from Karma tests running in Visual Studio Code
Publisher rctay
Website https://github.com/rctay/vscode-karma-problem-matcher
Reason Defines a problemMatcher pattern for errors in Karma tests, so test failures will show up in 'Problems' pane (Ctrl+Shift+M on Windows/Linux, ⇧⌘M on Mac) and the failing test also be made known to VS Code, eg. highlighted with squiggly lines, jump to it with F8.

Wallaby.js

-- Description
Extension Wallaby.js
Description Intelligent and super fast test runner for JavaScript/TypeScript/CoffeeScript.
Publisher Wallaby.js
Website https://wallabyjs.com/
Reason Wallaby.js is an intelligent and super fast test runner for JavaScript that continuously runs your tests. It reports code coverage and other results directly to your code editor, immediately as you change your code. Wallaby.js is insanely fast, because it only executes tests affected by your code changes and runs your tests in parallel. The tool provides a huge productivity boost whether you are doing TDD/BDD or using any other approach.

SCSS

Is good idea to add SCSS Formatter ans SCSS Intellisense

Anyway, your pack is the best!

Auto tag

請問一下保哥,安裝完您的pack後,為什麼都沒有Auto Tag功能?

Git History still in package.json

In 12.2.0's change log said Remove Git History extension but it's still in package.json

And also Git Graph is not in package.json

Clang-Format

-- Description
Extension Clang-Format
Description Use Clang-Format in Visual Studio Code
Publisher xaver
Website http://clang.llvm.org/docs/ClangFormat.html
Reason ClangFormat describes a set of tools that are built on top of LibFormat. It can support your workflow in a variety of ways including a standalone tool and editor integrations.
Precondition It need to install npm install -g clang-format before using this extension.

[Request] Publish extension on open-vsx.org

Hi there!

I'm reaching out to you because we currently have your extension manually added to our extension gallery at Coder for code-server, and we're currently working on a migration to open-vsx, which is also used by other community VSCode forks (including, but not limited to Arch Linux's Code-OSS builds and VSCodium).

We (and other open source VSCode forks) cannot use Microsoft's extension gallery, as MS' terms of service allows only the proprietary MS products to interact with the official gallery.

We'd really appreciate it if you can add your extension to open-vsx! A simple guide on publishing extensions to Open-VSX is available here.

Angular-io-Code useless

Hi, I'm seeing Angular-io-Code just have 1 star on Marketplace. Do you think it's usefully?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.