-
Notifications
You must be signed in to change notification settings - Fork 90
Angular Explorer View
Angular Explorer View gives you the capability to display lits of modules and controllers of your AngularJS application :
This view is usefull for :
- display modules, controllers, etc in a view and go to the definition if you double click on it (open the JS editor and select the module, controller).
- AngularJS "HTML templates" where module and controller is not defined inside the HTML. So you can link module and controller to the current HTML editor to benefit with Angular expression completion.
Script path is configurated in the Tern Project properties
The "Go To Definition" contextual menu gives the capability to open the JS editor and select the module, controller selected (you can do that too with double click) :
If you try to open completion inside angular expression in HTML Template (like https://github.com/angular/angular-phonecat/tree/master/app/partials), you will notice that completion doesn't work:
Indeed, a HTML Template file doesn't include some scripts (with script elements) and doesn't define a controller in the HTML page (with ngController directive attribute name) : completion doesn't know which controller to use to retrieve model from the $scope of the controller.
To resolve this problem, you can link the HTML file to a controller with "Link to Controller" menu action from teh "Angular Explorer" view :
After linking the HTML page with a controller, completion works now inside angular expression :