implemented angular service and resource for snippets