Created
November 19, 2013 01:08
-
-
Save jonnybojangles/7538433 to your computer and use it in GitHub Desktop.
A question for later. This in ability makes testing difficult.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider('widget', [function(){ | |
var that = this; | |
this.hi = function(){ | |
return 'Hi'; | |
}; | |
this.$get = [function(){ | |
return { | |
hello : function(){ | |
/* | |
* How can a provider reference it self? | |
* */ | |
world(); | |
}, | |
world: function(){ | |
return 'Hello World' | |
}, | |
hi: function(){ | |
console.log(this.hi()); | |
console.log(that.hi()); | |
} | |
} | |
}]; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment