Comments (7)
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.
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.
I think project properties is the best.
from angularjs-eclipse.
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.
Ok I have found an other idea that I think is more simply than editor : use a view.
I explain my idea :
- 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).
- 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.
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.
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)
- Run AS->protractor throws error client file cannot be empty. HOT 1
- Phonecat in AngularJS-Eclipse, and 'bower' HOT 2
- Why in my eclipse Node modules throwing error when i am installing protractor locally ?
- Missing documentation on how to expand HTML validation HOT 2
- Error when creating Angular2 project HOT 2
- hmmm...installed from marketplace but nothing changed... HOT 1
- Error when run test case
- Angular2 IDE Plugin Issue HOT 6
- Angular2 Eclipse HOT 1
- Problem with source hover popup and Dark theme
- Cannot find node install path node-native HOT 3
- Could Not find the required bundle org.eclipse.wst.html.core;bundle-version="1.2.0" HOT 1
- Can we Install Protractor in Elcipse
- Incorrect scope in Angular
- ng command not recognized in eclipse preference HOT 1
- Code completion does not work for Angular directives
- Unknown directive parameter for directive ng-md-icon
- Troubles installing any version of angularjs 1.3 or 1.2
- Using user-provided arguments in Protractor run configuration
- Unable to install the plugin in eclipse-oxygen javascript version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angularjs-eclipse.