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

17,453

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).

Share:
17,453
Mahesha999
Author by

Mahesha999

Updated on July 16, 2022

Comments

  • Mahesha999
    Mahesha999 almost 2 years

    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?