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 247480 - Support for mixed $scope and controllerAs
Summary: Support for mixed $scope and controllerAs
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
Depends on: 242570
  Show dependency tree
Reported: 2014-09-25 16:40 UTC by Vladimir Riha
Modified: 2015-09-09 11:29 UTC (History)
1 user (show)

See Also:
Exception Reporter:

sample project (2.86 MB, application/zip)
2014-09-25 16:40 UTC, Vladimir Riha

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-09-25 16:40:27 UTC
Created attachment 149523 [details]
sample project

Please checked the attached project. It seems like you can combine "controller as" and $scope at the same time. I don't know if it is common (personally I don't think so as mixing 2 different approaches could be imho messy) but it works for Angular.

In the attached project:
 - open phone-list.html
 - type {{}} on line 9
 - invoke code completion inside the expression


 - orderProp should be offered

It seems like editor ignores $scope if controllerAs is detected.

As I've said, I have no idea if this is a good/common approach. 

Thank you

Product Version: NetBeans IDE Dev (Build web-main-1322-on-20140925)
Java: 1.8.0_20; Java HotSpot(TM) Client VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)