Skip to content

Instantly share code, notes, and snippets.

@dunckr
Last active December 27, 2015 17:19
Show Gist options
  • Save dunckr/7361386 to your computer and use it in GitHub Desktop.
Save dunckr/7361386 to your computer and use it in GitHub Desktop.
Angular CoffeeScript Minsafe Templates
class Ctrl
constructor: (@$scope) ->
angular.module('app').controller 'ctrl', ['$scope', Ctrl]
angular.module('app')
.directive 'dir', ->
restrict: 'E'
template: '
<div></div>
'
angular.module('app').factory 'Model', ->
class Model
constructor: ->
class Service
constructor: (@dependancy) ->
angular.module('app')
.factory 'service', (dependancy) -> new Service(dependancy)
angular.module('app')
.factory 'name', (superclass,dependancy) ->
class Name extends SuperClass
constructor: (dependancy) ->
new Name(dependancy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment