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 242568 - "Track by" and "as"marked as error
Summary: "Track by" and "as"marked as error
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-05 09:15 UTC by Vladimir Riha
Modified: 2014-12-01 13:51 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 Vladimir Riha 2014-03-05 09:15:41 UTC
Angular 1.2 introduces track by extension to ng-repeat

<div  ng-repeat="item in items track by item.id">
</div>

but IDE marks it as erorr



Product Version: NetBeans IDE 8.0 (Build 201403032200)
Java: 1.8.0; Java HotSpot(TM) Client VM 25.0-b69
Runtime: Java(TM) SE Runtime Environment 1.8.0-b131
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Roman Svitanic 2014-09-26 09:51:26 UTC
In Angular 1.3 alias expression "as" has been introduced as ng-repeat directive extension. See [1] for more details.

<li ng-repeat="item in items | filter:searchQuery as results">
</li>

[1] https://docs.angularjs.org/api/ng/directive/ngRepeat
Comment 2 Roman Svitanic 2014-09-26 09:55:05 UTC
fixed in web-main:
http://hg.netbeans.org/web-main/rev/b226caa17b57
Comment 3 Quality Engineering 2014-09-27 05:05:22 UTC
Integrated into 'main-silver', will be available in build *201409270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b226caa17b57
User: Roman Svitanic <rsvitanic@netbeans.org>
Log: Added support for "track by" and "as" expressions in AngularJS ng-repeat directive (issue #242568)
Comment 4 Vladimir Riha 2014-09-29 13:28:56 UTC
Thank you, verified

Product Version: NetBeans IDE Dev (Build 201409290001)
Java: 1.7.0_67; Java HotSpot(TM) Client VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 5 elennaro 2014-12-01 13:34:29 UTC
Doesn't work for me.

See "Expected ) but found track by for (var post in posts track by post.id){"


<swipe-card id="{{::post.id}}" class="card" ng-repeat="post in posts track by post.id" 
										on-destroy="cardDestroyed($index)" 
										on-reject="cardRejected($index)" 
										on-keep="cardKeeped($index)"
										drag-left="dragLeft($index)"
										drag-right="dragRight($index)"
										drag-end="dragEnd($index)"
										fly-left="out">

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 8 version 6.2 running on amd64; UTF-8; en_US (nb)

Reopen, please.
Comment 6 Vladimir Riha 2014-12-01 13:47:34 UTC
It will be part of upcomnig NetBeans 8.1, not 8.0.2. You can download daily dev build from http://bits.netbeans.org/download/trunk/nightly/latest/ to try it.
Comment 7 Roman Svitanic 2014-12-01 13:48:36 UTC
(In reply to elennaro from comment #5)
> Doesn't work for me.
> 
> Product Version: NetBeans IDE 8.0.2 (Build 201411181905)

There has been an issue affecting AngulaJS support and was present in mentioned build. This issue is already fixed. Please use more recent daily build. Thanks!
Comment 8 elennaro 2014-12-01 13:51:22 UTC
Oh, OK, sorry and thanks.