|
|
|
|
|
by vojtajina
5118 days ago
|
|
You can use data-* prefix for all the directives. Btw, here's my point:
The reason, why you want valid html, is to be able to use some html validator, which is super helpful, when finding bugs like unclosed div etc.
However, if you prefix all the custom attributes with data-* you only get these attributes ignored, not validated. For example if you type data-ng-rrepeat="", the validator won't catch it. So I would rather extend html validator to accept new tags/attributes in some format, say JSON, so that during the build process of your app, you can get all the directives your app defines and validate them. Then you get even your custom directives validated. I believe that's the way to go. |
|