Open gdennie opened 10 years ago
In the following snippet, a space between the '$http' and open parenthesis, '(', dramatically alters the translation. Importantly, this same issue does not occur in CoffeeScript. I believe this is a significant bug in part because it is so slight:
angular.module "contactsApp.service", [], ($provide) -> $provide.factory "ContactsService", ["$http", "$location", ($http, $location) -> contacts = [] return { addItem : (item) -> contacts.push item $http( #<--- BUG!! '$http (' compiles to somethingelse url: "/api/contacts" method: "POST" data: JSON.stringify item ) .success -> toastr.success "You have contact!", "Success!" $location.path "/" } ]
In the following snippet, a space between the '$http' and open parenthesis, '(', dramatically alters the translation. Importantly, this same issue does not occur in CoffeeScript. I believe this is a significant bug in part because it is so slight: