Base Angular 1.1.4 Fiddle
AngularJS 1.1.4 Includes jQuery http://stackoverflow.com/questions/16828287/what-things-can-be-injected-into-others-in-angular-js
by manoj
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js"></script>
<div ng-app="myApp">
</div>
JavaScript
// AngularJS 1.1.4
// http://stackoverflow.com/questions/16828287/what-things-can-be-injected-into-others-in-angular-js
var myMod = angular.module('myApp', []);
myMod.provider('greeting', function() {
var text = 'Hello, ';
this.setText = function(value) {
text = value;
};
this.$get = function() {
return function(name) {
alert(text + name);
};
};
});
myMod.config(function(greetingProvider) {
greetingProvider.setText("Howdy there, ");
});
myMod.run(function(greeting) {
greeting('Ford Prefect');
});