a-
.
The code completion will disappear. So this will not happen with camelCase.
Now I use a
or aNg
and rx
as a prefix, to be faster while typing.
It is based on the Visual Studio Code implementation: https://github.com/johnpapa/vscode-angular2-snippets This extension for NetBeans adds snippets for Angular for TypeScript and HTML.
Type part of a snippet, pressenter
or tab
, and the snippet unfolds.
- aComponent - component
- aComponentInline - component with inline template
- aComponentRoot - root app component
- aDirective - directive
- aGuardCanActive -
CanActivate
guard - aGuardCanActiveChild -
CanActivateChild
guard - aGuardCanDeactivate -
CanDeactivate
guard - aHttpGet -
http.get
with Rx Observable - aHttpclientGet -
httpClient.get
with Rx Observable - aHttpInterceptor - Empty Angular
HttpInterceptor
forHttpClient
- aHttpInterceptorHeaders - Angular
HttpInterceptor
that sets headers forHttpClient
- aHttpInterceptorLogging - Angular
HttpInterceptor
that logs traffic forHttpClient
- aModule - module
- aModuleRoot - root app module
- aModuleRouting - routing module file (forChild)
- aOutputEvent -
@Output
event and emitter - aPipe - pipe
- aRoutePath404 - 404 route path
- aRoutePathDefault - default route path
- aRoutePathEager - eager route path
- aRoutePathLazy - lazy route path
- aRouterEvents - listen to one or more router events
- aService - service
- aServiceHttp - service with
Http
- aServiceHttpclient - service with
HttpClient
- aCtorSkipSelf - angular
NgModule
'sskipself
constructor - aSubscribe - Rx
Observable
subscription - aResolver - resolver
- rxObservable - Rx
Observable
import - rxSubject - Rx
Subject
import - rxReplaySubject - Rx
ReplaySubject
import - rxBehaviorSubject - Rx
BehaviorSubject
import - rxAddOperator - Rx add operator import
- rxAddObservable - Rx add observable import
- aClass -
[class]
binding - aNgClass -
ngClass
- aNgContainer -
<ng-container>
element - aNgContent -
<ng-content>
element - aNgFor -
*ngFor
- aNgForAsync -
*ngFor
with async - aNgForTrackBy -
*ngFor
with trackBy - aNgIf -
*ngIf
- aNgIfElse -
*ngIf
withelse
- aNgModel -
ngModel
- aNgStyle -
ngStyle
- aNgSwitch -
ngSwitch
- aNgTemplate -
<ng-template>
element - aPrej - show the JSON form of a model
- aPreja - show the JSON form of a model, using async
- aRouterLink -
routerLink
- aRouterLinkParam -
routerLink
with a route parameter - aSelect -
<select>
control - aStyle -
[style]
binding
Install the plugin.
Test it into a TypeScript or HTML file (Examples: typescript shortcut aPipe
+ TAB => import { Pipe, PipeTransform..., html shortcut aNgSwitch
+ TAB => <div [ngSwitch]=...", ...)