Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down