Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Created January 17, 2018 09:48
Show Gist options
  • Save goyalrohit/d7cdaa582970efdb88af2baa83cecbb1 to your computer and use it in GitHub Desktop.
Save goyalrohit/d7cdaa582970efdb88af2baa83cecbb1 to your computer and use it in GitHub Desktop.
Angular Provider Function
(function() {
var app = angular.module('app', []);
app.config(function($provide)){
$provide.provider('books',function(){
this.$get=function(){
var appName = 'Book Logger';
var appDesc = 'Track which books you read';
return {
appName: appName,
appDesc: appDesc
};
};
});
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment