Here is a collection of code snippets for Visual Studio that speed up the development of AngularJS applications. These code snippets are based on the work of angularjs-livetpls with a few additions. Such as:
- More snippets for writing Jasmine (expect...)
- A couple general purpose JavaScript snippets (anonymous function, immediately invoke function expression)
- HTML snippets for using built-in AngularJS directives (attribute style only, at present)
These snippets have been tested in Visual Studio 2012, but I expect them to work in VS2005+ (let me know if they don't, or submit a pull request).
Download v1.0 (.zip)
- Download the AngularJS Snippets folder and all of its contents from this respository here: https://github.com/tyson-benson/AngularJS-Snippets/zipball/master
- Extract the zip and drop the AngularJS Snippets folder into the Documents > Visual Studio 2012 > Code Snippets folder on your computer.
- In Visual Studio, navigate to Tools > Code Snippet Manager.
- Select language HTML from the language dropdown menu.
- Select the Add button at the bottom.
- Locate the "Documents/Visual Studio 2012/Code Snippets/AngularJS-Snippets" folder and click Select Folder.
- You should now see AngularJS-Snippets in the listing of HTML snippets under the Code Snippet Manager.
- Change the language dropdown at the top of the Code Snippet Manager to JavaScript.
- Repeat steps 5-7 for the "Documents/Visual Studio 2012/Code Snippets/AngularJS-Snippets" folder.
- Click OK to exit the Code Snippet Manager.
- Restart Visual Studio.
- Start using the code snippets.
The instructions above are adapted from xxkylexx's Visual-Studio-jQuery-Code-Snippets project.
There are about 90 code snippets for JavaScript, AngularJS and Jasmine included. You can view a listing of all of these snippets on the project wiki here: https://github.com/tyson-benson/AngularJS-Snippets/wiki/Snippet-Listing
- Create an easy installer.
- Create snippets for JSDoc style documentation