json 创建角度组件vscode片段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json 创建角度组件vscode片段相关的知识,希望对你有一定的参考价值。

{
	"Create angular es7 component": {
		"prefix": "ng-component",
		"body": [
			"class ${1:ClassName} {",
				"\tconstructor() {$7}",
			"}",
			"",
			"export const ${2:ClassNameComponent} = {",
				"\ttemplate: ${3:template},",
				"\tcontroller: $1,",
				"\tcontrollerAs: '$${4:ctrl}',",
				"\tbindings: {",
					"\t\t$5",
				"\t},",
				"\ttransclude: ${6:boolean},",
			"};"
		],
		"description": "Create a padronized es7 component fo angular"
	},
	"Create angular es7 component using decorator": {
		"prefix": "ng-decorator-component",
		"body": [
			"import { Component } from 'decorators';",
			"",
			"@Component({",
				"\tcontrollerAs: '$${1:ctrl}',",
				"\ttemplate: ${2:template},",
				"\ttransclude: ${3:boolean},",
				"\tinputs: [$4],",
				"\toutputs: [$5],",
			"})",
			"export class ${6:ClassName} {",
				"\tconstructor() { }",
			"}"
		],
		"description": "Create a padronized es7 component fo angular"
	}
}

以上是关于json 创建角度组件vscode片段的主要内容,如果未能解决你的问题,请参考以下文章

json 我的vscode片段

json Conf VSCode片段

json VScode片段

json vscode片段

json SCSS vscode片段

VSCode插件开发全攻略代码片段设置自定义欢迎页