A collection of incredibly useful Sublime Text 3 snippets for fast, efficient, and worry-free Typescript Angular 2 development!
This documentation is under revision.
These won't just save you the time you are taking to copy and paste boilerplate or checking the documentation.
There are complex regex substitions (whereever they were practical) to save you a butt load of time hitting the same exact sequences of keys repeatedly in different areas of your code and/or figuring out the errors you caused by copying/pasting the wrong things in the wrong spot.
There are also tab stops (Press tab to go to different locations through the snippet) placed throughout in a position and order to most make your life easier.
It's also all formatted exactly according to the official Angular 2 Style Guide.
Some of the snippets are fundamentally just basic Typescript so feel free to use them in your vanilla Typescript stuff. There is no Sublime Text 3 scope just for Angular 2 application files so they are scoped to all .ts files.
- Set up your Angular 2 app using your preferred method (I recommend the angular-cli).
- Create a new empty file in Sublime 3.
- Save the empty file with a file name following the offical Angular 2 Style Guide. (i.e.: my-app.component.ts)
- Begin typing "ngComponent" to cue the snippet and then press enter.
- The snippet will generate the necessaries and automatically fill in configuration information exactly according to the Angular 2 style guide.
- If the default isn't good enough for you, tab stops are conveniently placed to allow you to quickly configure your component exactly as you see fit faster than you can say "dependency injection"