diff --git a/src/snippets.json b/src/snippets.json index 52ac8e9..122bb5a 100644 --- a/src/snippets.json +++ b/src/snippets.json @@ -165,6 +165,28 @@ "$0" ] }, + "Angular Component Standalone": { + "prefix": "ng-component-standalone", + "description": "Standalone component with template and style urls", + "types": "typescript", + "body": [ + "import { Component, OnInit } from '@angular/core';", + "", + "@Component({", + "\tselector: '${1:app}-${2:name}',", + "\ttemplate: `${3}`,", + "\tstyles: [`${4}`],", + "\tstandalone: true,", + "\timports: []", + "})", + "export class ${5:Name}Component implements OnInit {", + "\tconstructor($6) { }", + "", + "\tngOnInit() {${7: }}", + "}", + "$0" + ] + }, "Angular Component With NG_VALUE_ACCESSOR": { "prefix": "ng-component-value-accessor", "description": "Angular Component With NG_VALUE_ACCESSOR", @@ -526,6 +548,24 @@ "}" ] }, + "Angular Pipe Standalone": { + "prefix": "ng-pipe-standalone", + "description": "Standalone pipe template", + "types": "typescript", + "body": [ + "import { Pipe, PipeTransform } from '@angular/core';", + "", + "@Pipe({", + "\tname: '${name}',", + "\tstandalone: true", + "})", + "export class ${Name}Pipe implements PipeTransform {", + "\ttransform(value: any): any {", + "\t\t$0", + "\t}", + "}" + ] + }, "Angular Pipe Example": { "prefix": "ng-pipe-example", "description": "Angular pipe example",