Skip to content

Instantly share code, notes, and snippets.

@heath
Last active August 29, 2015 13:56
Show Gist options
  • Save heath/8923492 to your computer and use it in GitHub Desktop.
Save heath/8923492 to your computer and use it in GitHub Desktop.
#fp style
angular.module('app')
.controller 'OverviewCtrl', [ '$scope', '$state'
($scope, $state) ->
foo = "foo"
angular.extend $scope, {
foo
}
]
#oo style
class OverviewCtrl
$inject: ['$scope', '$state']
constructor: (@scope, @state) ->
console.log 'OverviewCtrl initialized'
angular.module('app').controller 'OverViewCtrl', OverviewCtrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment