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.

Bug 245016 - 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
Summary: in an angularjs project I created a custom directive: <myDirective></myDirect...
Status: RESOLVED DUPLICATE of bug 234998
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-12 14:40 UTC by douglasv
Modified: 2014-10-02 12:19 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
IDE log (61.67 KB, text/plain)
2014-06-12 14:40 UTC, douglasv
Details

Note You need to log in before you can comment on or make changes to this bug.
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 1 douglasv 2014-06-12 14:40:30 UTC
Created attachment 147652 [details]
IDE log
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.
Comment 3 Roman Svitanic 2014-10-02 12:19:43 UTC

*** This bug has been marked as a duplicate of bug 234998 ***