Skip to content

Instantly share code, notes, and snippets.

Created May 18, 2015
What would you like to do?
Revealing Module Pattern for Angular Services
function BlogpostSerivce(){
var service = this;
service.getBlogs = getBlogs;
service.createBlog = createBlog;
service.getBlogName = getBlogName;
var blogName = 'Test Blog';
var blogs = ['blog1', 'blog 2', 'blog3'];
function getBlogs(){
return blogs
function createBlog(blogObject){
function getBlogName(){
return blogName;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment