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 231444

Summary: Partial HTML not recognized as Angular when using data-* form of directives
Product: web Reporter: Vladimir Riha <vriha>
Component: AngularJSAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED    
Severity: normal CC: ppisl
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Riha 2013-06-18 13:13:50 UTC
In my project, I use data-ng-* form of directives to make it HTML5 valid, problem is that this way, editor does not recognize given HTML as "AngularJS file" so JavaScript code completion in expression does not work, neither does coloring etc. For instance:


 <table>
        <tr data-ng-repeat="spec in specs | filter:titleQuery">
            <td><a href="#specification/{{spec.id}}">{{spec.version}} - {{spec.title}}</a></td>
            <td data-ng-repeat="action in spec.controls">
                <div class="btn-toolbar">
                    <div class="btn-group" >
                        <button class="btn" data-ng-click="perform(action.onClick, spec.id)">{{action.title}}</button>
                    </div>
                </div>
            </td>
        </tr>
    </table>


=> expressions in between {{ }} are not colored correctly (plain black) and code completion inside them does not work. Once I add single ng-* attribute to the entire page, it starts to work. Even following does work

<li data-ng-repeat="b in breadcrumbs"><a href="#/{{b.link}}">{{b.title}}</a> <span class="divider">/</span></li>

This could be dupl. of issue 224637 , but I think this is slightly different. I'm sorry if not.



Product Version: NetBeans IDE Dev (Build web-main-10829-on-20130618)
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.2.0-45-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Marek Fukala 2013-06-25 03:58:58 UTC
yep, it is exactly what 224637#4 is about.
Comment 2 Vladimir Riha 2013-06-25 05:45:24 UTC
Ok, thanks

*** This bug has been marked as a duplicate of bug 224637 ***
Comment 3 Marek Fukala 2013-06-25 08:05:24 UTC
I didn't want you to close this one as the other is ENH and the issue needs to be addressed, but never mind, lets keep it as it is and I'll try to fix it today.
Comment 4 Marek Fukala 2013-06-27 14:37:32 UTC
fixed in web-main#f71ddf0779f4
Comment 5 Vladimir Riha 2013-06-28 06:48:20 UTC
Thanks a lot, verified. Code completion also adjust to either data-* or ng-*


Product Version: NetBeans IDE Dev (Build 201306272300)
Updates: Updates available
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.2.0-45-generic-pae running on i386; UTF-8; en_US (nb)