Giter Club home page Giter Club logo

Comments (7)

loicmathieu avatar loicmathieu commented on May 26, 2024

IMHO, the page with ng-app is the root. So it can be done by scanning all HTML files (when openning or changing the nature of the project to Angular) and adding the JS for autocompletion based on the existance of the ng-app attribute.

Anyway, this needs to be added in a list of root files that can be modified. Keep in mind that we can have multiple root file in a single project (you can have multiple ng-app defined in your eclipse project).

Adding index.html by convention seems to be a good start to this root file list.

An other solution will be to maintain a list of JS files instead of root files. But I'm not sure which one will be the best.

Regards,

Loïc

from angularjs-eclipse.

angelozerr avatar angelozerr commented on May 26, 2024

IMHO, maintain a list of JS files can be boring, so I think it's better to define an HTML root. And as you have said, we must define several HTML root.

So the config for manage completions in HTML editor with HTML Templates must be :

  • HTML root page (to define a list of scripts)
  • The module (or not)
  • The Controller.

My question is how to configure that? (Project Properties, Editor, View?)

from angularjs-eclipse.

loicmathieu avatar loicmathieu commented on May 26, 2024

I think project properties is the best.

from angularjs-eclipse.

angelozerr avatar angelozerr commented on May 26, 2024

I'm afraid that Project Properties (which is a dialog) can be boring to do the config for each HTML templates. I tell me that we could have an Angular "Dashboard" Editor to customize that. There is an instance of Dashboard Editor per Project. This "Dashboard" Editor could host several tabs like "HTML Templates" to configure each HTML Templates.

The "HTML Templates" page could host :

  • a section which defines a list of HTML root page.
  • a section which displays the HTML templates with master/detail feature. When you select one HTML template, a section displays teh config of this HTML Template (root, module, controller).

What do you think about that?

from angularjs-eclipse.

angelozerr avatar angelozerr commented on May 26, 2024

Ok I have found an other idea that I think is more simply than editor : use a view.

I explain my idea :

  1. In the Tern project properties, I will add "Root paths" page property. This page will display a list of root path. A root path defines a lits of scripts to load. You can have several kind of root path :
  • HTML root path : you define an html/jsp file which include teh whole scripts to load.
  • Folder root path : you define a folder where js are hosted.
  • File root path : you define a js file to load.

I will start to developp HTML root path at first (we will see if Folder and File path are interesting in the future).

  1. I will provide a View which display in a treeview list of controllers available :

index.html
-MyModule
--MyController1
--MyController2
-MyModule2
--MyController2.1
index2.html
-MyModule2
....

When you open an HTML template, you must just select the well controller to link it with the activated HTML editor .This link info could be store in the File metadata to avoid selecting each time the link.

What do you think about that?

from angularjs-eclipse.

angelozerr avatar angelozerr commented on May 26, 2024

My work is not finished, but you can see some explanation and screenshots about "HTML Templates at https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View

from angularjs-eclipse.

angelozerr avatar angelozerr commented on May 26, 2024

This feature is finished. Please see screenshot at https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View#html-template-linkunlink

from angularjs-eclipse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.