Skip to content

Instantly share code, notes, and snippets.

@heath
Last active August 29, 2015 13:56
#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