How to add organization Namespace import without addon?

We have a number of utility and common Ember classes that we would like to easily share throughout our application. Right now, we are referencing those classes using relative paths to the javascript files, but that isn’t particularly nice looking. I was able to create a new Namespace and reference classes that way, but “import” didn’t work. I was trying to do something like:

import MyOrg from ‘myorg’

but that fails even if I have defined a Namespace “myorg”. I think this must somehow be tied into Ember CLI, but I’m not exactly sure if that is the case and how it is done. Can anyone point me to any examples of how to register something so that imports work correctly without having to resort to using relative references or a separate addon instance.

Thanks, Craig

1 Like

Can you explain this more. How did you go about defining a new namespace? Are you referring to a folder called myorder that was created under app/?

I actually was just creating an instance as part of app startup. This was just as a test to see if I could get anything to work at all. Is it as simple as just creating a “myorg” folder in the app folder?