News for hackers. Stuff that matters.
Re:The worst thing about CoffeeScript by standup75 on Saturday January 25, 2014 @02:51PM (#7122056)
Never had this problem with coffeescript until... today. Some hours after I read this post. Thanks

angular.module("blabla", []).directive "bla", ->

template: """ <div>Whatever<div ng-transclude></div></div></div> """ scope: true transclude: true restrict: "E" compile: (element, attributes) -> $input = element.find "input" for attr, value of attributes.$attr $input.attr value, attributes[attr] element[0].removeAttribute value

		(scope, element, attributes) ->
			$input = element.find "input"
			# do something with $input
			# now $input is global to all directive and that sucks
Re:The worst thing about CoffeeScript by saraid216 on Saturday January 25, 2014 @03:32PM (#7122261)
Drop a "space space" in front of every line in your code and it'll format monospace.