• Stars
    star
    567
  • Rank 76,109 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Angular Snippets for VS Code

Angular TypeScript Snippets for VS Code

Updated for Angular 16.0.1 release

This extension for Visual Studio Code adds snippets for Angular for TypeScript and HTML.

Use Extension

See the CHANGELOG for the latest changes

Angular Essentials

Check out the Angular Essentials extension for more great extensions for developing with JavaScript and Angular.

Usage

Type part of a snippet, press enter, and the snippet unfolds.

Alternatively, press Ctrl+Space (Windows, Linux) or Cmd+Space (macOS) to activate snippets from within the editor.

Command Palette Commands

Command Purpose
express: Add simple Express server file to workspace Adds Node.js express server

TypeScript Angular Snippets

Snippet Purpose
a-component component
a-component-standalone standalone component
a-component-inline component with inline template
a-component-root root app component
a-ctor-skip-self angular NgModule's skipself constructor
a-directive directive
a-guard-can-activate CanActivate guard
a-guard-can-activate-child CanActivateChild guard
a-guard-can-deactivate CanDeactivate guard
a-guard-can-match CanMatch guard
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-module module
a-module-root root app module
a-output-event @Output event and emitter
a-pipe pipe
a-preload-opt-in-strategy custom preload strategy that allows choosing which routes to preload
a-preload-network-strategy custom preload strategy that preloads based on network connectivity
a-resolver resolver
a-routes Route definition file
a-rxjs-import import RxJs features
a-rxjs-operators import RxJs operators
a-route-path-404 404 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
a-service service with injectable provided in root
a-service-httpclient service with HttpClient
a-subscribe Rx Observable subscription
a-trackby to create a trackby function in TypeScript for the ngFor

NgRx Snippets

Snippet Purpose
a-ngrx-store-module create an NgRx store module
a-ngrx-create-action create an NgRx action with createAction
a-ngrx-create-action-props create an NgRx action with createAction with props
a-ngrx-create-reducer create an NgRx reducer with createReducer
a-ngrx-create-effect create an NgRx effect with createEffect
a-ngrx-create-effect-api create an NgRx effect with createEffect for an API call
a-ngrx-create-selector create an NgRx selector with createSelector
a-ngrx-create-selector-props create an NgRx selector with createSelector with props
a-ngrx-data-entity-data-module-import add EntityDataModule
a-ngrx-data-entity-metadata create the entity metadata for NgRx
a-ngrx-data-entity-collection-data-service create a data service using NgRx

Dockerfile Snippets

Snippet Purpose
docker-angular-node-multi-stage Multi-stage Dockerfile for Node with Angular

JavaScript Snippets

Snippet Purpose
ex-simple-server Node.js Express Server

HTML Snippets

Snippet Purpose
a-class [class] binding
a-select <select> control
a-style [style] binding
a-ngClass ngClass
a-ngFor *ngFor
a-ngForAsync *ngFor with async
a-ngFor-trackBy *ngFor with trackBy
a-form create a form tag with ngSubmit and form attributes
a-formArrayName formArrayName
a-formControlName formControlName
a-formGroup formGroup
a-formGroupName formGroupName
a-form-submit create a submit button for a form
a-ngIf *ngIf
a-ngIfElse *ngIf with else
a-ngModel ngModel
a-routerLink routerLink
a-routerLink-param routerLink with a route parameter
a-ngStyle ngStyle
a-ngSwitch ngSwitch
a-prej show the JSON form of a model
a-preja show the JSON form of a model, using async
a-ng-container <ng-container> element
a-ng-template <ng-template> element
a-ng-content <ng-content> element

VS Code Snippets

Snippet Purpose
a-launch-chrome launch/debug configuration for VS Code for Chrome
a-launch-edge launch/debug configuration for VS Code for Edge
a-task-start create a task configuration for starting the Angular app for VS Code

Installation

  1. Install Visual Studio Code 1.10.0 or higher
  2. Launch Code
  3. From the command palette Ctrl-Shift-P (Windows, Linux) or Cmd-Shift-P (OSX)
  4. Select Install Extension
  5. Choose the extension
  6. Reload Visual Studio Code

Credits

Thanks to the following contributors for the NgRx snippets:

More Repositories

1

angular-styleguide

Angular Style Guide: A starting point for Angular development teams to provide consistency through good practices.
23,968
star
2

lite-server

Lightweight node server
JavaScript
2,298
star
3

ng-demos

variety of angular demos
JavaScript
1,705
star
4

vscode-peacock

Subtly change the color of your Visual Studio Code workspace. Ideal when you have multiple VS Code instances, use VS Live Share, or use VS Code's Remote features, and you want to quickly identify your editor.
TypeScript
1,014
star
5

angular-ngrx-data

Angular with ngRx and experimental ngrx-data helper
TypeScript
972
star
6

generator-hottowel

Yo generator that creates an Angular app via HotTowel
JavaScript
837
star
7

angular-tour-of-heroes

Angular - Tour of Heroes - The Next Step after Getting Started
TypeScript
822
star
8

gulp-patterns

Playground for Gulp Recipes
JavaScript
502
star
9

HotTowel-Angular

HotTowel with Angular (for NuGet)
JavaScript
238
star
10

ngrx-data-lab

Sample app that can be expanded to use ngrx-data
TypeScript
216
star
11

pwa-angular

PWA Example
TypeScript
204
star
12

vue-getting-started

This project is seen in demos including the Pluralsight course "Vue: Getting Started" to help represent a fundamental app written with Vue. The heroes and villains theme is used throughout the app.
Vue
191
star
13

heroes-angular

Tour of Heroes app written with Angular
TypeScript
161
star
14

pluralsight-gulp

Starter Code for Pluralsight Course "JavaScript Build Automation with Gulp.js"
JavaScript
161
star
15

vscode-winteriscoming

Dark theme with fun and bright foreground colors
CSS
157
star
16

angular-event-view-cli

Angular Demo with a Little bit of a lot of features
TypeScript
154
star
17

vue-typescript

Vue.js with TypeScript (OLD - in process of updating)
Vue
145
star
18

hottowel-angular-typescript

As seen at //Build 2015 presented by Erich Gamma, Chris Dias and John Papa.
JavaScript
145
star
19

heroes-vue

Tour of Heroes app written with Vue
Vue
144
star
20

HotTowel

John Papa's ASP.NET MVC SPA Template (Durandal)
CSS
144
star
21

heroes-react

Tour of Heroes app written with React
JavaScript
133
star
22

shopathome

Choose from Angular, React, Svelte, and Vue applications with an Azure Functions API, that deploys to Azure Static Web Apps
TypeScript
133
star
23

PluralsightSpaJumpStartFinal

Source code for the SPA JumpStart Pluralsight course at http://jpapa.me/spajsps
JavaScript
133
star
24

vscode-angular-essentials

Dockerfile
132
star
25

hello-worlds

Hello world apps for angular, react, svelte, and vue
TypeScript
128
star
26

heroes-angular-serverless

TypeScript Node/Express πŸ‘‰TypeScript Serverless βž•Angular
TypeScript
125
star
27

angular2-force

ngConf 2016 live coding demo
JavaScript
115
star
28

angular-preload-and-interceptors

TypeScript
104
star
29

vscode-cloak

Cloak allows you to hide/show environment keys, to avoid accidentally sharing them with everyone who sees your screen.
TypeScript
104
star
30

angular-first-look-examples

angular first look for pluralsight
HTML
90
star
31

angular-first-look-hosted

Hosted Code from Pluralsight Course "Angular First Look"
HTML
86
star
32

angular-cosmosdb

Cosmos DB, Express.js, Angular, and Node.js app
TypeScript
81
star
33

CodeCamper

JavaScript
71
star
34

pluralsight-vscode-samples

VS Code samples for Pluralsight course on Code
JavaScript
70
star
35

docker-angular-cli

Dockerfile and image for node plus angular CLI
Dockerfile
69
star
36

awesome-angular-workshop

Angular: The Awesome Parts - Workshop
TypeScript
68
star
37

angular.breeze.storagewip

Save Work in Progress to Local Storage for Angular and Breeze apps
JavaScript
66
star
38

Pluralsight-CC-Angular-Breeze-Extra

Supporting files for the Pluralsight "SPA with Angular and Breeze" course by John Papa.
JavaScript
64
star
39

one-with-angular

TypeScript
61
star
40

node-ts

Simple Node app Written with TypeScript
TypeScript
59
star
41

node-hello

Hello World for Node.js
JavaScript
59
star
42

http-interceptors

The Web apps in this monorepo make HTTP requests and require uniform consistency in how they are executed and handled. This monorepo demonstrates the same app written with Angular and with Svelte. Each app uses HTTP interceptors. The Angular app uses HttpClient and its interceptors while the Svelte app uses Axios and its interceptors.
TypeScript
58
star
43

angular-what-if

TypeScript
57
star
44

express-to-functions

TypeScript Node/Express πŸ‘‰TypeScript Serverless βž• Angular
TypeScript
54
star
45

vikings

TypeScript
53
star
46

vue-guide

Super Simple Vue Samples
HTML
51
star
47

ngrx-demo

NgRx demo
TypeScript
50
star
48

typescript-async

Creating Asynchronous Code with TypeScript
TypeScript
48
star
49

ng-patterns-testing

JavaScript
48
star
50

vscode-angular1-snippets

vscode-angular1-snippets
41
star
51

vscode-pwa

VS Code Extension for PWA Tools
TypeScript
38
star
52

angular-lazy-load-demo

Lazy loading Angular components
TypeScript
32
star
53

github-templates

31
star
54

angular-2-first-look-launcher

deprecated
JavaScript
30
star
55

heroes-node-api

node api for the heroes apps
JavaScript
30
star
56

heroes-svelte

Tour of Heroes app written with Svelte
Svelte
30
star
57

kis-requirejs-demo

Keep It Simple RequireJS Demo. Shows simple demo of require.js before and after
JavaScript
30
star
58

heroes-vue-node-api

As seen in Vue Conf 2019
Vue
28
star
59

toastr-bower

toastr's bower repo
CSS
24
star
60

star-wars-api

Star Wars API
JavaScript
23
star
61

vue-workshop

Vue Fundamentals Workshops
Vue
23
star
62

vue-simple

This project was created to help represent a fundamental app written with Vue. The heroes and villains theme is used throughout the app.
Vue
23
star
63

typescript-fundamentals

HTML
21
star
64

vscode-read-time

TypeScript
19
star
65

vue-intro

Vue.js app using Vue's CLI
Vue
18
star
66

angular-rxjs-shared-examples

rxjs examples
TypeScript
17
star
67

serverless-thank-you

Say thank you to everyone who takes the time to create and discus or a pull request in your Github repository, using Azure Functions
TypeScript
17
star
68

swa-workshop

TypeScript
16
star
69

cloud-coding-with-codespaces

Live demo using Angular, github.dev, codespaces, copilot, azure static web apps, and devcontainers
TypeScript
13
star
70

vscode-azure-functions-tools

Azure Functions Tools for VS Code - DEPRECATED
12
star
71

vue-cli-preset-all-javascript

Vue CLI Preset for All JavaScript Prompts
12
star
72

vscode-presenter-pro

11
star
73

vue-ts

simple repro of master details with vue 3, composition api, and typescript
Vue
10
star
74

ios-play

iOS Playground
Swift
8
star
75

security-strategy-essentials

JavaScript
8
star
76

telekinesis

"Think" code
JavaScript
7
star
77

house-bot

Home automation with AI, LUIS, Serverless
JavaScript
7
star
78

johnpapa

7
star
79

first-serverless-api

Create your first serverless API endpoints with Azure Functions
JavaScript
7
star
80

innersource

6
star
81

Angular-NuGet

NuGet Repo for Angular Packages
JavaScript
6
star
82

angular-expiring-http-cache

TypeScript
5
star
83

ng-ai-hackathon

TypeScript
5
star
84

starwars-ios

Swift
5
star
85

one-with-angular-api

JavaScript
5
star
86

shopping-for-codespaces

CSS
4
star
87

svelte-intro

JavaScript
3
star
88

glimpse.toastr

JavaScript
3
star
89

typescript-hello-world

Simple hello world project for running TypeScript with Node.js
TypeScript
3
star
90

react-book-repo

3
star
91

pluralsight-ng-testing

pluralsight-ng-testing
CSS
2
star
92

skills-copilot-codespaces-vscode

My clone repository
1
star
93

dotfiles

1
star
94

aggregator-app

serverless function with api aggregator with azure
JavaScript
1
star
95

.github

1
star
96

vscode-import-bug

referencing https://github.com/microsoft/TypeScript/issues/35591
TypeScript
1
star