fromage-js/src/coffee/main.coffee

30 lines
535 B
CoffeeScript

###
# here we do stuff
###
angular.module "tkApp", []
.controller("MainCtrl", ($scope, $http)->
###
# scoped variables
###
$scope.demo = 'WOHOOO angular ça marche'
$http.get('json/squares.json').then( (data)->
$scope.config = data.data
)
###
# scoped functions
###
$scope.doStuff = ->
console.log('impressig!')
$scope.doStuffWithArg = (arg)->
console.log('wow such function!', arg)
###
# initilise everything
###
$scope.init = ->
console.log('mainCtrl initialised');
$scope.init()
)