Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Chris2011/netbeans-angular2-code-templates
Code templates for Angular 2 in Netbeans. Templates exists for TypeScript and HTML.
https://github.com/Chris2011/netbeans-angular2-code-templates
Last synced: 3 months ago
JSON representation
Code templates for Angular 2 in Netbeans. Templates exists for TypeScript and HTML.
- Host: GitHub
- URL: https://github.com/Chris2011/netbeans-angular2-code-templates
- Owner: Chris2011
- License: mit
- Created: 2016-05-09T13:05:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-27T14:38:58.000Z (about 7 years ago)
- Last Synced: 2024-06-29T11:33:50.308Z (4 months ago)
- Size: 217 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-netbeans - NetBeans Angular2 Code Templates - Code Templates for Angular 2+ projects. (:electric_plug: Plugins <a name="plugins"></a> / Language Support)
README
Angular TypeScript Snippets for NetBeans
Now Updated for Angular 4.3.0 release
Biggest change
Now I use camelCase, because NetBeans has a problem when you typea-
.
The code completion will disappear. So this will not happen with camelCase.Now I use
a
oraNg
andrx
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.TypeScript (old screenshot)
HTML (old screenshot)
Usage
Type part of a snippet, pressenter
ortab
, and the snippet unfolds.TypeScript Angular Snippets
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 AngularHttpInterceptor
forHttpClient
aHttpInterceptorHeaders - AngularHttpInterceptor
that sets headers forHttpClient
aHttpInterceptorLogging - AngularHttpInterceptor
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 withHttp
aServiceHttpclient - service withHttpClient
aCtorSkipSelf - angularNgModule
'sskipself
constructor
aSubscribe - RxObservable
subscription
aResolver - resolverTypeScript RxJS Snippets
rxObservable - RxObservable
import
rxSubject - RxSubject
import
rxReplaySubject - RxReplaySubject
import
rxBehaviorSubject - RxBehaviorSubject
import
rxAddOperator - Rx add operator import
rxAddObservable - Rx add observable importHTML Snippets
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]
bindingHow to install
Install the plugin.
Test it into a TypeScript or HTML file (Examples: typescript shortcut
aPipe
+ TAB => import { Pipe, PipeTransform..., html shortcutaNgSwitch
+ TAB => <div [ngSwitch]=...", ...)Known Bugs
HTML code completion doesn't include the code templates, but the code templates are working well. A Ticket was created: https://netbeans.org/bugzilla/show_bug.cgi?id=250321