Skip to content

Instantly share code, notes, and snippets.

@jackboberg
Last active August 29, 2015 13:55
Show Gist options
  • Select an option

  • Save jackboberg/8735047 to your computer and use it in GitHub Desktop.

Select an option

Save jackboberg/8735047 to your computer and use it in GitHub Desktop.
class PhoneListCtrl
inject: ['$scope','$http']
constructor: (@$scope, @$http) ->
@$scope.orderProp = 'age'
@$getPhones()
getPhones: () =>
@$http.get('phones/phones.json')
.success (data) =>
@$scope.phones = data
phonecatApp = angular.module 'phonecatApp', []
phonecatApp.controller 'PhoneListCtrl', PhoneListCtrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment