Skip to content

Instantly share code, notes, and snippets.

View cmartin81's full-sized avatar

Christian Martin cmartin81

  • Transponder / Martin Consulting
  • Hvalstad
View GitHub Profile
cmartin81 /
Last active November 8, 2017 08:04

Keybase proof

I hereby claim:

  • I am cmartin81 on github.
  • I am cmartin81 ( on keybase.
  • I have a public key ASDO8-shjkz76vJuWOmCUEWjf5nufdFILePgorpfelBY8Qo

To claim this, I am signing this object:

cmartin81 / gist:42c713be3034ead79799
Created July 28, 2015 22:43
How to use ng-decorator module
import {Factory, Directive, Provider, Service, Controller} from 'ng-decorators'
@Factory(['$window']) //or Directive or Provider or Service or Controller
class FooBar{
constructor(win){ //if you need to access the injected object it will be passed into the constructor
console.log(this.$window.origin); //all the injected values will be auto injected to the class under this.<injected object>