Angular Snippets for Sublime Text

If you develop AngularJS applications, sometimes you can forget the syntax for the numerous amount of services you can build.  I ran into this situation and finally figured that I would create these Angular snippets for Sublime Text to help me out.  I’ve written them to be inline and chainable, meaning you need to define your “app” variable or angular.module(”) before using these completions.  It has minification in mind, so as you tab (when you initiated the completion), you can inject dependencies and it will print out the way Angular needs to be to successfully minify.

Getting set up is easy.  With Sublime Text open, go in the menu bar and click, Sublime Text > Preferences > Browse Packages.  Finder will open, go into the User folder.  Download this Github Gist or create a new file and paste in the raw text of this Gist:

Immediately you can start typing “ng-” and you’ll see your options, from a constant, factory, filter, service, provider and more.  I use this all the time and I hope this is helpful in your development!