Sotera / GEQE

Geo Event Quey by Example - Leverage geo-located temporal text data in order to identify similar locations or events.
http://sotera.github.io/GEQE
The Unlicense
8 stars 7 forks source link

Fixed the Controller initialization and the require #10

Closed marek5050 closed 9 years ago

marek5050 commented 9 years ago

I think the private modules problem should be fixed now, I introduced a require wrapper function _require, that prepends the absolute path of the modules folder. This way we don't have to worry about npm install and npm link. This approach will be even more Windows compatible since node handles all the path information.


var root_directory= __dirname; _require = function(what){ var loc=root_directory+path.sep+"modules"+path.sep+what; return require(loc); };


On the front-end I changed the controllers to listen to an initiation event, on which they call their init methods.


//INIT $scope.init = function(){ $scope.getDataSets(); $scope.populatePolygonSelect(); } $scope.$on(_isAppConfigured,$scope.init);


It seems a lot cleaner than the previous $watch attempt. I also introduced the _isAppConfigured variable, which is initialized in the mainController (as we did in VMR)