Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.34 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.34 KB

Angular Snippets

If you are half the lazy I am and you do not like to waste time typing the same boilerplate code over and over you are going to find this package useful. This is a collection of common snippets based on the way I usually develop my apps. The following snippets are available:

Controllers

  • _cc -> Collection (Controller that deal with list operations)
  • _ce -> Entity (Controller that deals with single entity operations)

Factories

  • _fc -> Collection (Factory dedicated to manage item collections)
  • _fe -> Entity (Factory dedicated to manage single entity operations, ex: changePrice, save, etc)

Filters

  • _f -> Filter definition

Directives

  • _d -> Directive definition

Functions

  • _pf -> Private method definition
  • _proto -> Private prototype method definition
  • _protoo -> Prototype object definition
  • _pubf -> Public function definition
  • _sm -> Scope method

Objects

  • _prop -> Object.defineProperty default definition

Tests (Jasmine)

  • _utc -> Unit Test for a Controller
  • _utf -> Unit Test for a Factory
  • _desc -> Describe stub
  • _be -> Before Each stub
  • _it -> It stub
  • _sp -> spyOn stub
  • _spresolve -> jasmine spy with resolved promise
  • _spreject -> jasmine spy with rejected promise

HTML (Bootstrap 3)

  • _vc -> Container
  • _vdd -> Dropdown
  • _vs -> Section
  • _vtb -> Textbox