Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Angular Snippets by shaman-apprenticeNew to Visual Studio Code? Get it now.
Angular Snippets by shaman-apprentice

Angular Snippets by shaman-apprentice

shaman-apprentice

|
26 installs
| (0) | Free
Snippets for Angular
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

angular-snippets

Adds snippet commands for Angular development. The active editor must be a TypeScript file for the commands to be active.

Features

component

a-component within some.component.ts will result in:

import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';

@Component({
  selector: 'app-some',
  templateUrl: 'some.component.html',
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SomeComponent {}

a-component-folder will create a folder with prompted name, a component class as above and an empty html file.

directive

a-directive within doIt.directive.ts will result in:

import { Directive } from "@angular/core";

@Directive({
  selector: "[appDoIt]",
})
export class DoItDirective {}

service

a-service within butler.service.ts will result in:

import { Injectable } from "@angular/core";

@Injectable({ providedIn: "root" })
export class ButlerService {}

pipe

a-pipe within pureHydrogen.pipe.ts will result in:

import { Pipe, PipeTransform  } from '@angular/core';

@Pipe({
  name: 'appPureHydrogen',
})
export class PureHydrogenPipe implements PipeTransform {
  transform(value: unknown): unknown {
    return value;
  }
}

jest

a-jest within quickMath.calculator.test.ts results in:

import { describe, expect, test } from "@jest/globals";

describe("quickMath.calculator", () => {
  test("quick math", () => {
    expect(2 + 2 - 1).toBe(3);
  });
});
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft