I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript, which makes learning this stuff harder.
Javascript is the lingua franca of frontend web development. Stick to that.
I guess it goes both ways. I have to mentally translate all those boilerplate curly mess when reading JavaScript and find CoffeeScript much easier to understand. CoffeeScript is much closer to Ruby syntactically, not to mention a Rails default.
I am absolutely with you here, but it seems that a lot of people are using coffeescript in tutorials because it's become the de-factor convention for Rails apps.
Fortunately for us, it's relatively easy to convert it to regular javascript.
Bottom line: everyone who knows coffeescript knows javascript. The inverse is not true. Personal preference, de facto standards, "it's just like ruby" - none of this has to even come into the equation.
>everyone who knows coffeescript knows javascript.
Is this necessarily true? You can't put coffeescript between script tags and just have it run, as it's designed to use incompatible idioms which need to be 'compiled' to js (because js is ugly and awkward).
It's entirely possible someone who has only ever used coffeescript and has a deep aversion to js has no idea how to actually write the js version of whatever it is they're coding.
That's assuming they've never had to debug one of their programs, ever. Even with a distaste for braces and semi colons they will have to eventually look through the compiled code, or run through something like js2coffee.
Rails has defaulted to scaffolding with coffeescript and sass since version 3.1. It makes sense then in the context of a rails 4 tutorial, that the code would be in coffeescript.
Maybe the solution is to incorporate js/coffeescript switcher tabs into the code boxes. It would be a pretty easy feature to add to a code highlighting library.
Javascript is the lingua franca of frontend web development. Stick to that.