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 230223 - AngularJS support marks hash iteration as an error
Summary: AngularJS support marks hash iteration as an error
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-24 10:22 UTC by _ tboudreau
Modified: 2013-05-31 01:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2013-05-24 10:22:34 UTC
The following pattern is marked as an error in the editor but is not one:

<span ng-repeat="(key, val) in stuff"> // <--- This is legal with angular
  {{key}}: {{val}}
</span>


function Items($scope) {

   $scope.stuff = { hello : true, foo : 'bar'};
}
Comment 1 Petr Pisl 2013-05-29 11:57:48 UTC
Tim how does look your whole page? Is there the controller defined somewhere in the page?
Comment 2 Petr Pisl 2013-05-29 12:18:45 UTC
Assigning to me.
Comment 3 _ tboudreau 2013-05-29 17:06:16 UTC
Html looks like this;  the data is JSON loaded from the server:

                    <div class="span5 definitions" ng-show="definitions">
                        <h4>Definitions</h4>
                        <div ng-repeat="item in definitions">
                            <a href="#" ng-click="setWord(item)" class="defname">{{item.word | capitalize}}</a> &mdash;
                            <ol style="display:inline">
                                <span ng-repeat="(id, def) in item.definitions| lastModified">
                                    <i ng-show="item.definitions">{{id + 1}}.</i> {{def.def}}
                                </span>
                            </ol>
                        </div>
                    </div>
Comment 4 Petr Pisl 2013-05-29 19:57:37 UTC
Fixed in web-main
http://hg.netbeans.org/web-main/rev/f0bf2810e063

So Tim, do you use configuration file for setting the controller?
Comment 5 _ tboudreau 2013-05-29 22:07:41 UTC
There are several related Javascript files that compose together to create the controller - probably more stuff than you want me to attach here - since it's an angular application composed from several modules.

The code that goes and gets the data is fairly simple:
    $http.get(urls.path('recent?count=100')).success(function(recent) {
        $scope.recent = recent;
        startListening()
    });

(urls is another angular module).  It is loaded from the root path of the web server:  <script src="/scripts/main.js"></script>
Comment 6 Quality Engineering 2013-05-31 01:22:16 UTC
Integrated into 'main-golden', will be available in build *201305302301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f0bf2810e063
User: Petr Pisl <ppisl@netbeans.org>
Log: #230223 - AngularJS support marks hash iteration as an error