This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | in an angularjs project I created a custom directive: <myDirective></myDirective>, in the html file I entered this directive and netbeans editor told me "Not allowed as child element of <div>" The editor does not understand angularjs directives | ||
---|---|---|---|
Product: | web | Reporter: | douglasv <douglasv> |
Component: | AngularJS | Assignee: | Petr Pisl <ppisl> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | ppisl |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | IDE log |
Description
douglasv
2014-06-12 14:40:13 UTC
Created attachment 147652 [details]
IDE log
Yes, recognizing directives from their declaration in JS file is not supported. But HTML editor offers feature to "compensate" this: - in the HTML file, there is a bulb icon next to the line number of line with this <mydirective> element - click on the bulb icon and select "Add element mydirective to the project's custom elements" - error goes away and code completion in HTML editor will now also offer "mydirective" The same can be done with attributes. I noticed there is a bug in this feature that when you have e.g. myDirective, NetBeans will "learn" mydirective (all lower case), I file a issue agains HTML editor. Workaround is to add the myDirective to project's custom elements (it adds mydirective), now open [projectFolder]/nbproject/customs.json and change mydirective to myDirective. *** This bug has been marked as a duplicate of bug 234998 *** |