magnars/angular-snippets.el — pull request #3 by pandeiro (2013-11-15 22:54:15+00:00)
Title: Naming changes, semicolons and new .when() snippet

These are really helpful, but I'd also prefer shorter mnemonics.

I am not sure I agree with the snippet for controller. For ngc I would like a syntax similar to that of ngd, ngfa, etc:

.controller('$1', function($scope, $2) {
$0
})

I'm also not sure about leaving the semicolons off everywhere. Routing is the only place in Angular where I usually chain a bunch of things; what do you guys think? I've gone ahead and added semicolons where appropriate, and excluded them from a new ngw. This new ngw snippet looks like this:

.when("/$1", {
templateUrl: "$2",
controller: "$0"
})

Let me know what you think.