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 229691

Summary: support for ng-repeat
Product: web Reporter: Marek Fukala <mfukala>
Component: AngularJSAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: ppisl
Priority: P1    
Version: 7.4   
Hardware: PC   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:

Description Marek Fukala 2013-05-14 06:42:52 UTC
Right now the JS code completion for the pipe position in the example below neither offers the item element nor its sub-properties item.|

I'm not sure how hard is this to implement, but would be extremely useful.

<!DOCTYPE html>
<html ng-app>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="angular.js"></script>
        <script>
            function list($scope) {
                $scope.items = ['maty', 'tobi'];
            }
        </script>
    </head>
    <body>
        <div ng-controller="list">
            <ol>
                <li ng-repeat="item in items">{{|}}</li>
            </ol>
        </div>
    </body>
</html>
Comment 1 Marek Fukala 2013-05-14 06:59:24 UTC
I've fixed the html.angular module os the ng-repeat content is parsed as javascript, which seems to work quite well even for the more complicated cases like ng-repeat="(name, age) in {'adam':10, 'amalie':12}", but there's a JS error from the virtual source on 'ng-repeat="item in items" -- missing semicolon'. Can you Petre take a look at that problem as well?
Comment 2 Petr Pisl 2013-05-14 07:16:01 UTC
Sure, I look at this.