Comments (6)
@caguillen214 is looking into this as it is somewhat close to his logic for checking for different directives.
from angular-hint.
So after doing a little investigation, I figured out that the way to get the directives loaded/created isn't as similar to how we can get the modules loaded/created as we first imagined.
I came up with the approach below, which is significantly simpler than what has to be used in the directives. Essentially by checking the dependencies of all modules created, we know which modules are eventually going to be loaded. Keeping track of the modules created and the ones to be loaded, allows us to then compare the two sets and find out which modules were created but _not_ loaded
angular.module = function() {
var module = llLib.originalAngularModule.apply(this,arguments);
if(module.requires.length) { // if the module has dependencies
llLib.storeDependencies(module); //store those dependencies as modules that will be loaded
}
llLib.createdModules[module.name] = module; //store the module as one that has been created
return module;
};
However, this approach is limited in the sense that the only modules that it knows are going to be loaded are ones declared as dependencies for other modules. If there is in fact a way to load in a module aside from doing it as dependency in another module, this approach will not work for those cases. Thoughts? Are there other ways to load modules besides as dependencies, @btford?
from angular-hint.
This is being addressed temporarily at: https://github.com/caguillen214/loading-loader
It's in a good place to be transferred over to angular-hint. Can we make a repo and come up with a name for this one? @btford
from angular-hint.
Mostly just not sure what to call this :/
from angular-hint.
Added: https://github.com/angular/angular-hint-modules
from angular-hint.
This is closed. It will be tracked further in the repo mentioned above.
from angular-hint.
Related Issues (20)
- RFC: Improving hints related to $parse HOT 1
- causing infinite digests on angular material wesbite
- $watch override makes one-time bindings in expressions to never clear the associated watch HOT 2
- Incorrectly reports digest time HOT 2
- TypeError: Cannot read property 'name' of undefined at module.exports HOT 15
- Error when loading angular-hint with requirejs HOT 7
- Validate directive / component definition HOT 1
- Script Error in requirejs environment, cannot load angular-hint. HOT 2
- Not seeing any warning /Error on console.
- Log / Warn for naming collisions in registerables (directives, controllers, filters etc.)
- hint.js giving error, Cannot read property 'name' of undefined HOT 2
- A semicolon error
- dist angular-hint.js file to be used without requirejs? HOT 7
- NPM install fails HOT 1
- Reconsidering bower? HOT 4
- humanReadableWatchExpression error on app load HOT 2
- Why controllers, dom and directives not working? HOT 1
- "$event is undefined"
- Unexpected end of expression when using 'angular-ui-bootstrap' HOT 4
- A bower-angular-hint would be nice HOT 1
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 angular-hint.