Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom AngularJS directives to html validator in Netbeans 7.4 IDE?

I recently switched to Netbeans 7.4 IDE from Eclipse and would like to know how to add custom Angular directives to html validator.

If you add something like this to your html file:

<div>
    <my-directive></my-directive>
</div>

an error will be shown stating:

"Element "my-directive" not allowed as child of element "div" in this context."

I could just disable "elements" attribute in html validator to avoid this error but I'd rather not since it will suppress real errors.

like image 982
Mirko Filipovic Avatar asked Nov 05 '13 08:11

Mirko Filipovic


1 Answers

You can either declare a custom namespace for your directives, see http://forums.netbeans.org/post-59359.html or define custom tags: http://wiki.netbeans.org/CustomTagActions

like image 64
mmattax Avatar answered Nov 02 '22 19:11

mmattax