Created
January 17, 2018 09:48
-
-
Save goyalrohit/d7cdaa582970efdb88af2baa83cecbb1 to your computer and use it in GitHub Desktop.
Angular Provider Function
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
(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