sanjeyac / angularjs-snippets-for-brackets

AngularJS code templates for Brackets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AngularJS code templates for Brackets

This is a set of snippets for Brackets by Adobe

It contains the following skeletons, based on John Papa's AngularJS Style Guide

  • controllers
  • directive
  • factory
  • filter
  • module
  • service
  • route
  • and many other partials (see below)

Note: this file has been merged in the officiale guide here: Brackets Section

Install

First of all download the file

  1. In order to install the snippets you have to install 'Brackets Snippets (by edc)' from the Extension manager ( File > Extension manager ) and download the angularjsSnippets.yml from the repository
  2. After you have installed the Snippet Manager click on the Snippet Manager icon on the right side (a bulb)
  3. A panel will appear on the bottom. Click on Settings and then on Import.
  4. Select angularjsSnippets.yml from where you downloaded and it's done.

Usage

Write 'ngcontroller' on a Javascript file to generate an AngularJS Controller skeleton and press TAB to customize all the paramaters of the code.

The following elements works in the same way:

These are full file snippets containing an IIFE

  • ngcontroller - a controller
  • ngdirective - a directive
  • ngfactory - a factory
  • ngfilter - a filter
  • ngservice - a service
  • ngapp - an angular module
  • ngroute - routing with the standard route provider

These are partial snippets intended to chained

  • ngwhen - defines a routing when configuration
  • ngmodule - creates an angular module getter
  • ngstate - creates an Angular UI Router state defintion
  • ngconfig - defines a configuration phase function
  • ngrun - defines a run phase function

About

AngularJS code templates for Brackets