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.
Created attachment 139044 [details] IDE log Please try this: file.JS: function Ctrl($scope) { $scope.page = 1; $scope.printAttempt = { number: 1, total: 2 } $scope.print= function() { }; } function Ctrl2($scope) { $scope.foo = 1; } index.html: <div> <h1>{{name}}</h1>{{lastName}} Name: <input type="text" ng-model="pr"/> </div> => in index.html, invoke cc for the ng-model attribute after "pr" => printAttempt is not offered, now finish it like <input type="text" ng-model="print"/> and again invoke cc => printAttempt is offered now Product Version: NetBeans IDE Dev (Build 201308212300) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
The index.html page should contain definition of the controller. When I extend the index.thml to <div ng-controller="Ctrl"> <h1>{{name}}</h1>{{lastName}} Name: <input type="text" ng-model="pr"/> </div> then ti works as expected. I'm closing for now as invalid, but please reopen, if the condition are different than I'm expecting.
But the ng-controller is not required, please have a look at [1]. One benefit of this is that you can clearly see which route is handled by which controller (see [2] for instance - of course this is just use case and it says nothing about how common it is). Please notice the last case in the description. If you have <input type="text" ng-model="print"/> and invoke cc after "print|", printAttempt is offered. Could it be offered from the beginning then? I can't tell if ng-controller or $routeProvider way is more often in "real world". If you think it is more of a feature request, please feel free to change it. [1] http://docs.angularjs.org/tutorial/step_07 [2] http://services.netbeans.org/synergy/client/app/js/app.js
This should work in NB 8.0. Recognizing controllers in app.js via "when" method implemented.