Last active
December 27, 2015 17:19
-
-
Save dunckr/7361386 to your computer and use it in GitHub Desktop.
Angular CoffeeScript Minsafe Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ctrl | |
constructor: (@$scope) -> | |
angular.module('app').controller 'ctrl', ['$scope', Ctrl] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app') | |
.directive 'dir', -> | |
restrict: 'E' | |
template: ' | |
<div></div> | |
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app').factory 'Model', -> | |
class Model | |
constructor: -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Service | |
constructor: (@dependancy) -> | |
angular.module('app') | |
.factory 'service', (dependancy) -> new Service(dependancy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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