Skip to content

Instantly share code, notes, and snippets.

@davidpp
Created August 16, 2013 03:00
Show Gist options
  • Select an option

  • Save davidpp/6246910 to your computer and use it in GitHub Desktop.

Select an option

Save davidpp/6246910 to your computer and use it in GitHub Desktop.
'use strict'
class WebService
constructor: (@$http) ->
login: (user) ->
@$http.post("http://localhost:3000/login", user)
getData: () ->
@$http.get("http://localhost:3000/getData")
angular.module "demoApp.webService", [], ($provide) ->
$provide.factory "webService", ["$http", ($http) -> new WebService($http)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment