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|
|Component:||AngularJS||Assignee:||Petr Pisl <ppisl>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
Description douglasv 2014-06-12 14:40:13 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Comment 2 Vladimir Riha 2014-06-13 06:40:38 UTC
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.