如何在Netbeans 7.4 IDE中向html验证器添加自定义AngularJS指令?

Mir*_*vic 8 netbeans angularjs

我最近从Eclipse切换到Netbeans 7.4 IDE,想知道如何将自定义Angular指令添加到html验证器.

如果你在你的html文件中添加这样的东西:

<div>
    <my-directive></my-directive>
</div>
Run Code Online (Sandbox Code Playgroud)

将显示一个错误说明:

"Element "my-directive" not allowed as child of element "div" in this context."
Run Code Online (Sandbox Code Playgroud)

我可以在html验证器中禁用"elements"属性以避免此错误,但我不愿意,因为它会抑制真正的错误.

mma*_*tax 2

您可以为指令声明自定义命名空间,请参阅http://forums.netbeans.org/post-59359.html或定义自定义标记:http://wiki.netbeans.org/CustomTagActions