I hereby claim:
- I am cmartin81 on github.
- I am cmartin81 (https://keybase.io/cmartin81) on keybase.
- I have a public key ASDO8-shjkz76vJuWOmCUEWjf5nufdFILePgorpfelBY8Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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(win.location.host) | |
} | |
logOrigin(){ | |
console.log(this.$window.origin); //all the injected values will be auto injected to the class under this.<injected object> |