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 234757 - AngularJS autocomplete doesn't seem to work for attributes starting with 'data'
Summary: AngularJS autocomplete doesn't seem to work for attributes starting with 'data'
Status: RESOLVED WONTFIX
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-22 05:34 UTC by digitman222
Modified: 2013-08-22 13:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (52.25 KB, text/plain)
2013-08-22 05:34 UTC, digitman222
Details

Note You need to log in before you can comment on or make changes to this bug.
Description digitman222 2013-08-22 05:34:14 UTC
Product Version = NetBeans IDE Dev (Build 201308172300)
Operating System = Linux version 3.5.0-17-generic running on i386
Java; VM; Vendor = 1.7.0_11
Runtime = Java HotSpot(TM) Client VM 23.6-b04

I have the following html file:

 <select data-placeholder="{{1+2}}" class="chosen span5" multiple="multiple">
    <option value="{{3+3}}"></option>
    <option>Dallas Cowboys</option>
    <option>New York Giants</option>
    <option>Philadelphia Eagles</option>
  </select>
									
If I type 'data-ng-' inside any of the <option>s, I don't see an autocomplete window. However typing only ng-repeat does show the autocomplete. This should work for data-ng as well as only ng.
Comment 1 digitman222 2013-08-22 05:34:19 UTC
Created attachment 139036 [details]
IDE log
Comment 2 Vladimir Riha 2013-08-22 06:25:49 UTC
I assume you mean that it doesn't show up automatically, but if you press Ctrl+Space it does, right? If so, reproducible if one puts caret right after "n" in option and press space

Product Version: NetBeans IDE Dev (Build 201308182300)
Updates: Updates available
Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 3 Vladimir Riha 2013-08-22 07:42:32 UTC
I think it is supposed to work this way. Once you have some data-ng-* attribute used in your code, it opens automatically as with plain ng-*
Comment 4 Marek Fukala 2013-08-22 09:57:43 UTC
(In reply to Vladimir Riha from comment #3)
> I think it is supposed to work this way. Once you have some data-ng-*
> attribute used in your code, it opens automatically as with plain ng-*
yes.
Comment 5 Marek Fukala 2013-08-22 11:28:49 UTC
Digitman, please confirm Vlada's assumptions or reopen. Thanks for the report.
Comment 6 digitman222 2013-08-22 12:31:19 UTC
Ctrl + space should not be required, just typing ng- within a tag, e.g:

<option ng-

causes the autocomplete to show up, without the need for ctrl + space. However, if you type the following:

<option data-ng-

then the autocomplete doesn't show up as expected (it may show up after ctrl + space, but it should show up automatically as it does for plain ng- attributes).
Comment 7 digitman222 2013-08-22 12:34:25 UTC
On further testing, it seems that if the file contains one previous angularjs tag, then the autocomplete works for the future tags, but for the first tag within a file, it works for ng- attributes (without ctrl + space) but doesn't work for data-ng- attributes.
Comment 8 Marek Fukala 2013-08-22 13:05:33 UTC
yep, that's exactly what Vlada mentioned in comment#3 and what is the designed behaviour. The reason is that we do not want to spoil the completion window with all the possible notations so the completion behaves according to the notation used in the file. The drawback you've explored is that for the first time you need to type it w/ the completion help. This minor issue can possibly be removed, if you insist on that I can change this to enhancement and fix that bit later. I personally consider this a very minor problem though.