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 252803

Summary: Please add navigation for angular dependencies.
Product: web Reporter: Christian Lenz <chrizzly>
Component: AngularJSAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: ppisl
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: gulpAng test app

Description Christian Lenz 2015-06-04 13:25:38 UTC
When I create a new project with the generator-angular (yo angular) and add a folder with services to it and inject the service into a controller, I can't navigate to the service. This would be very helpful. Here is my little snippet:

angular.module('app')
  .controller('AboutCtrl', ['$scope', 'AboutService', function ($scope, AboutService) {
    $scope.awesomeThings = [
      'HTML5 Boilerplate',
      'AngularJS',
      'Karma'
    ];
  }]);

Now when you ctrl + click on AboutService, nothing happend. It works, if you try to inject an other controller, only a test, afaik It's not possible to inject controller to an other one. Folder structure:

\app
...\controllers
......aboutCtrl.js
...\services
......aboutService.js


Regards

Chris
Comment 1 Christian Lenz 2015-09-07 08:00:54 UTC
This feature is still available in IntelliJ.
Now I use an other folder structure which is called packageg by feature and not package by layer.

\myModule
...myModule.js (Ctrl + Directive, is needed)
...myModule.tpl.html
...myModule.service.js
Comment 2 Christian Lenz 2016-01-11 12:11:50 UTC
Created attachment 158084 [details]
gulpAng test app
Comment 3 Christian Lenz 2016-01-11 12:11:58 UTC
I think there is some navigation in, but int only works for properties or functions and not for the object itself.

I have a Ctrl and I DI the testMapping service, which is on the same namespace of the main module (gulpAng). I can't navigate to the file when I Ctrl + Click it or hit F12. I don't get any code completion for this service but it returns an JS Object with some properties (Only testcase for this but this is a real world problem). I only can navigate when I hit testMapping.FirstThing. Then everything is fine. Navigation to methods doesn't work too.

I added the project and you can reproduce the problem inside main.controller.js in line 12. You can Ctrl + click testMapping which navigate to the argument testMapping but if you hit ctrl + click on the argument, nothing happens. If you ctrl + click on FirstThing, it navigates to the file to the right position. if you type "testMapping." the properties where not found.


Regards

Chris
Comment 4 Christian Lenz 2016-02-16 13:28:04 UTC
The strange is, the navigation works for some functions and properties, but there is no code completion via typing ^^. So navigation works, code completion not. And an other thing is when I navigate to a function definition, it sometimes opens the dist/myModule.js file and navigates to the builded stuff.
Comment 5 Christian Lenz 2016-02-16 13:28:47 UTC
I changed it to bug, if we can split it, I can create new tickets for this, if you want.