HI all, Im new to the group , trying to learn through the code in github;
What javascript routing library is being used in atlas front end? I can’t see any configured in the require js config or injected in the app.js
I just see it being called and used in app.js
Hi, @pwachira,
Glad to see someone else looking for these sorts of things. I had some trouble looking for this myself. The router is required here:
But what is very confusing about all of this is that we later create the router here:
So, to put the whole confusing situation together here: main.js is require()'ing the director module, which is later used in app.js referencing a class called ‘Router’. I agree this is just very hard to follow; we shouldn’t be using any modules that aren’t correctly spec’ed as AMD modules. In this case, it appears director.min.js is placing a object ‘Router’ in the global scope (a no-no in AMD terms).
We haven’t looked into looking for more up to date libraries (and until I saw this particular issue with the way the module is being required, I thought it was fine). But, you sound like you know your way around a JS library, have you used any routing libraries?
We’re always looking for more JS expertise to help us find these sorts of problems int he codebase, so keep poking around and identify these sort of issues! it’s a great help.
-Chris
ok @Chris_Knoll,
I found documentation of the router here
I have no issues with it - - If it ain’t broke no need to fix it. was just trying to follow how the app works and I was looking for the router ,
Even a search for the word ‘route’ in the github repo did not bring up the director.js file
Maybe would be cleaner to follow the one module/class per file
thanks for the info.
I do plan to look more and maybe start conributing
Javascript routing is a little bit complicated. I am working on a project but sometimes windows are creating some issue, it is showing windows error 0x80248007. You may search the word route in Github, you will definitely get some useful result.