Dashes in AngularJS events
theY4Kman opened this issue · 1 comments
When I put dashes in Angular event names ("hallo-modified" instead of "hallomodified"), they don't get called. I don't receive any errors. I'm not sure how to debug this, but I really want to separate words in my events. I have no idea why this is so.
If it's because event names are somewhere stored as identifiers (and are thus restricted to [_a-zA-Z][_az-A-Z0-9]
), I would offer I come from an IDE (PyCharm). Strings are immediately visually differentiable from attributes and variables and the such. I have no trouble quickly seeing the difference between an identifier and a string, and as an event is always referenced by a string, I have very little trouble visually recognizing an event apart from an identifier. But if the limit of dashes was designed for editors without this highlighting, I completely understand.
However, I don't want to put much confidence in that, because if something as arbitrary as a string were accepted, surely exceptions or errors would be raised if input requirements were violated. But it's possible those requirements aren't implemented, yet.
I'm gonna devote time to figuring out why dashes don't work, and how I could possibly namespace events. I've seen colons before, but I really want to know why dashes don't work.
After testing dashes individually, and each working successfully, it became apparent my global search and replace of "hallomodified" to "hallo-modified" had also changed the jQuery event name :P