Top "Coffeescript" questions

CoffeeScript is a language that compiles into JavaScript.

How to return object explicitly in CoffeeScript

This works: myfunc = () -> id: 3 name: 'myname' But I want to be explicit about returning object. myfunc = () -> …

coffeescript
coffeescript multiline strings compile into multiline strings

How come that this string "answer to life the universe and everything is #{40+2} " compiles into " answer to life the universe …

coffeescript
CoffeeScript: Getter/Setter in Object Initializers

ECMAScript allows us to define getters or setters as following: [text/javascript] var object = { property: 7, get getable() { return this.property + 1; }, …

javascript oop coffeescript getter-setter ecmascript-5
Grunt: Watch multiple files, Compile only Changed

I'm new to Grunt, and so far I'm enjoying it very much. I want Grunt to compile only the changed …

node.js coffeescript gruntjs
Coffeescript --- How to create a self-initiating anonymous function?

How to write this in coffeescript? f = (function(){ // something })(); Thanks for any tips :)

javascript javascript-framework coffeescript
Ember: how do you access the model from the router?

Based on what I've read (please correct me if I'm mistaken), the logic that handles when a model should be …

ember.js coffeescript
Getting the loop index in an eco template

Is it possible to get the current loop index using the eco template engine? For example in Jinja2 you can …

coffeescript eco
CoffeeScript - Referencing DOM nodes in Angular expressions is disallowed

My main question is simple : I get errors when doing DOM manipulation within Controllers or Directives however, the functionality works …

javascript jquery angularjs dom coffeescript
How to iterate through JSON hash with coffeescript

I'm new to Coffeescript and I'm having issues resolving an issue. I have a JSON object that is currently stored …

json hash coffeescript ruby-on-rails-3.2
Why is this sinon spy not being called when I run this test?

I have a Backbone Model: class DateTimeSelector extends Backbone.Model initialize: -> @bind 'change:date', @updateDatetime @bind 'change:time', @…

javascript backbone.js jasmine coffeescript backbone-events