1+ <templateSet group =" Angular1+ngMetadata Snippets" >
2+ <template name =" ng-component" value =" import { Component, OnInit } from 'ng-metadata/core'; @Component({ selector: '$PREFIX$-$SELECTOR$', template: `$TEMPLATE$` }) export class $COMPONENT_NAME$Component implements OnInit { constructor() { } ngOnInit() { } $END$ }" description =" Angular1 component snippet" toReformat =" false" toShortenFQNames =" true" >
3+ <variable name =" PREFIX" expression =" " defaultValue =" " my" " alwaysStopAt =" true" />
4+ <variable name =" SELECTOR" expression =" " defaultValue =" " alwaysStopAt =" true" />
5+ <variable name =" TEMPLATE" expression =" " defaultValue =" " Hello world" " alwaysStopAt =" true" />
6+ <variable name =" COMPONENT_NAME" expression =" capitalize(camelCase(SELECTOR))" defaultValue =" " ComponentName" " alwaysStopAt =" true" />
7+ <context >
8+ <option name =" TypeScript" value =" true" />
9+ </context >
10+ </template >
11+ <template name =" ng-directive" value =" import { Directive, OnInit } from 'ng-metadata/core'; @Directive({ selector: '[$PREFIX$$SELECTOR$]' }) export class $DIRECTIVE_NAME$Directive implements OnInit { constructor() { } ngOnInit() { } $END$ }" description =" Angular1 directive snippet" toReformat =" false" toShortenFQNames =" true" >
12+ <variable name =" PREFIX" expression =" " defaultValue =" " my" " alwaysStopAt =" true" />
13+ <variable name =" SELECTOR" expression =" " defaultValue =" " selector" " alwaysStopAt =" true" />
14+ <variable name =" DIRECTIVE_NAME" expression =" capitalize(camelCase(SELECTOR))" defaultValue =" " DirectiveName" " alwaysStopAt =" true" />
15+ <context >
16+ <option name =" TypeScript" value =" true" />
17+ </context >
18+ </template >
19+ <template name =" ng-bootstrap" value =" import { enableProdMode } from 'ng-metadata/core'; import { bootstrap } from 'ng-metadata/platform'; import { $ROOT_MODULE_NAME$Module } from './$PATH_TO_ROOT_MODULE$'; // enableProdMode(); bootstrap( $ROOT_MODULE_NAME$Module ); $END$" description =" Angular1 bootstrap snippet" toReformat =" false" toShortenFQNames =" true" >
20+ <variable name =" PATH_TO_ROOT_MODULE" expression =" " defaultValue =" " alwaysStopAt =" true" />
21+ <variable name =" ROOT_MODULE_NAME" expression =" capitalize(PATH_TO_ROOT_MODULE)" defaultValue =" " alwaysStopAt =" true" />
22+ <context >
23+ <option name =" TypeScript" value =" true" />
24+ </context >
25+ </template >
26+ <template name =" ng-pipe" value =" import { Pipe, PipeTransform } from 'ng-metadata/core'; @Pipe({ name: '$NAME$' }) export class $PIPE_NAME$Pipe implements PipeTransform { transform(value: any, args: any[]): any { $END$ } }" description =" Angular pipe snippet" toReformat =" false" toShortenFQNames =" true" >
27+ <variable name =" NAME" expression =" " defaultValue =" " name" " alwaysStopAt =" true" />
28+ <variable name =" PIPE_NAME" expression =" " defaultValue =" " PipeName" " alwaysStopAt =" true" />
29+ <context >
30+ <option name =" TypeScript" value =" true" />
31+ </context >
32+ </template >
33+ <template name =" ng-service" value =" import { Injectable } from 'ng-metadata/core'; @Injectable() export class $SERVICE_NAME$$SUFFIX$ { constructor($END$) { } }" description =" Angular1 service snippet" toReformat =" false" toShortenFQNames =" true" >
34+ <variable name =" SERVICE_NAME" expression =" capitalize(SERVICE_NAME)" defaultValue =" " alwaysStopAt =" true" />
35+ <variable name =" SUFFIX" expression =" " defaultValue =" " Service" " alwaysStopAt =" true" />
36+ <context >
37+ <option name =" TypeScript" value =" true" />
38+ </context >
39+ </template >
40+ <template name =" ng-module" value =" import * as angular from 'angular'; import { provide } from 'ng-metadata/core'; export const $ModuleName$Module = angular .module( '$PREFIX$$ModuleNameString$', [$requireModule$] )$END$ .name; " description =" Angular1 module snippet" toReformat =" true" toShortenFQNames =" true" >
41+ <variable name =" ModuleName" expression =" " defaultValue =" " alwaysStopAt =" true" />
42+ <variable name =" ModuleNameString" expression =" decapitalize(ModuleName)" defaultValue =" " alwaysStopAt =" true" />
43+ <variable name =" PREFIX" expression =" " defaultValue =" "" " alwaysStopAt =" true" />
44+ <variable name =" requireModule" expression =" " defaultValue =" " alwaysStopAt =" true" />
45+ <context >
46+ <option name =" JAVA_SCRIPT" value =" false" />
47+ <option name =" JS_EXPRESSION" value =" false" />
48+ <option name =" JSX_HTML" value =" false" />
49+ <option name =" JS_STATEMENT" value =" false" />
50+ <option name =" TypeScript" value =" true" />
51+ </context >
52+ </template >
53+ <template name =" ng-provide-d" value =" .directive(...provide($DIRECTIVE_REF$))$END$ " description =" Angular1 register directive/component snippet" toReformat =" true" toShortenFQNames =" true" >
54+ <variable name =" DIRECTIVE_REF" expression =" " defaultValue =" " alwaysStopAt =" true" />
55+ <context >
56+ <option name =" JAVA_SCRIPT" value =" false" />
57+ <option name =" JS_EXPRESSION" value =" false" />
58+ <option name =" JSX_HTML" value =" false" />
59+ <option name =" JS_STATEMENT" value =" false" />
60+ <option name =" TypeScript" value =" true" />
61+ </context >
62+ </template >
63+ <template name =" ng-provide-s" value =" .service(...provide($SERVICE_REF$))$END$ " description =" Angular1 register service snippet" toReformat =" true" toShortenFQNames =" true" >
64+ <variable name =" SERVICE_REF" expression =" " defaultValue =" " alwaysStopAt =" true" />
65+ <context >
66+ <option name =" JAVA_SCRIPT" value =" false" />
67+ <option name =" JS_EXPRESSION" value =" false" />
68+ <option name =" JSX_HTML" value =" false" />
69+ <option name =" JS_STATEMENT" value =" false" />
70+ <option name =" TypeScript" value =" true" />
71+ </context >
72+ </template >
73+ <template name =" ng-provide-st" value =" .service(...provide('$TOKEN$',{useClass:$SERVICE_REF$}))$END$ " description =" Angular1 register service via token snippet" toReformat =" true" toShortenFQNames =" true" >
74+ <variable name =" TOKEN" expression =" " defaultValue =" " alwaysStopAt =" true" />
75+ <variable name =" SERVICE_REF" expression =" " defaultValue =" " alwaysStopAt =" true" />
76+ <context >
77+ <option name =" JAVA_SCRIPT" value =" false" />
78+ <option name =" JS_EXPRESSION" value =" false" />
79+ <option name =" JSX_HTML" value =" false" />
80+ <option name =" JS_STATEMENT" value =" false" />
81+ <option name =" TypeScript" value =" true" />
82+ </context >
83+ </template >
84+ <template name =" ng-provide-c" value =" .constant(...provide('$TOKEN$',{useValue:$CONSTANT_REF$}))$END$ " description =" Angular1 register constant snippet" toReformat =" true" toShortenFQNames =" true" >
85+ <variable name =" TOKEN" expression =" " defaultValue =" " alwaysStopAt =" true" />
86+ <variable name =" CONSTANT_REF" expression =" " defaultValue =" " alwaysStopAt =" true" />
87+ <context >
88+ <option name =" JAVA_SCRIPT" value =" false" />
89+ <option name =" JS_EXPRESSION" value =" false" />
90+ <option name =" JSX_HTML" value =" false" />
91+ <option name =" JS_STATEMENT" value =" false" />
92+ <option name =" TypeScript" value =" true" />
93+ </context >
94+ </template >
95+ <template name =" ng-provide-v" value =" .value(...provide('$TOKEN$',{useValue:$VALUE_REF$}))$END$ " description =" Angular1 register value snippet" toReformat =" true" toShortenFQNames =" true" >
96+ <variable name =" TOKEN" expression =" " defaultValue =" " alwaysStopAt =" true" />
97+ <variable name =" VALUE_REF" expression =" " defaultValue =" " alwaysStopAt =" true" />
98+ <context >
99+ <option name =" JAVA_SCRIPT" value =" false" />
100+ <option name =" JS_EXPRESSION" value =" false" />
101+ <option name =" JSX_HTML" value =" false" />
102+ <option name =" JS_STATEMENT" value =" false" />
103+ <option name =" TypeScript" value =" true" />
104+ </context >
105+ </template >
106+ <template name =" ng-provide-p" value =" .filter(...provide($PIPE_REF$})$END$ " description =" Angular1 register pipe snippet" toReformat =" true" toShortenFQNames =" true" >
107+ <variable name =" PIPE_REF" expression =" " defaultValue =" " alwaysStopAt =" true" />
108+ <context >
109+ <option name =" JAVA_SCRIPT" value =" false" />
110+ <option name =" JS_EXPRESSION" value =" false" />
111+ <option name =" JSX_HTML" value =" false" />
112+ <option name =" JS_STATEMENT" value =" false" />
113+ <option name =" TypeScript" value =" true" />
114+ </context >
115+ </template >
116+ </templateSet >
0 commit comments