Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting jQuery and AngularJS content assist / auto-complete in eclipse for standalone HTML "file"

I have followed the steps described here for adding the autocomplete functionality to the eclipse.

In this after installing JSDT plugin, I have to create a project, then add the plugin as a JS resource. I have found two weird things:

  • I can get autocomplete even I have included no jQuery library in my html enter image description here
  • I cannot get the autocomplete for HTML file that I created explicitly say in notepad and opened in eclipse. For example in screenshot above in tempq.html I can get the autocomplete but in angularjsexp.html which is open in the another tab and which is not the part of any project I cannot get the autocomplete for jQuery when I enter $().

Also how can I get similar autocomplete for angularjs in eclipse. I read somewhere using JSDT only I can get the autocomplete functionality for angularjs too. Is it possible?

like image 645
Mahesha999 Avatar asked Aug 13 '13 08:08

Mahesha999


1 Answers

AngularJS Eclipse gives you completion for AngularJS (directive name (ng-app, ...), modules, controllers, expression on $scope model). It is based on tern.java which provides a jQuery plugin to benefit with jQuery (After configuring AngularJS nature in your project, you can select jQuery Tern Module on project properties Tern -> Modules).

like image 135
Angelo Avatar answered Sep 23 '22 02:09

Angelo