Closed juristr closed 8 years ago
your doing export default MessagesController
but then you reference it as if it were a named module. If you export default you don't import as a named module.
your doing export default MessagesController but then you reference it as if it were a named module. If you export default you don't import as a named module.
:+1: That was definitely not correct, thx.
Still...I'm not getting it :disappointed: . As soon as I reference a module directly in the app.js (in this case the dashboard
module), the app doesn't load properly any more (note the red screen doesn't come out). It's this line: https://github.com/juristr/angular-systemjs-seed/blob/adding-module/src/app/app.js#L9.
If I comment this line it works as expected...
Hi,
I'm having a closer look at your setup and encountered a strange issue. I fear it's something really stupid and I'm just missing something, but anyway :smile:
I forked your seed project and added a new module
messages
, just for playing around. When I reference the module from the dashboard module..everything works as expected. I'm able to load the
MessageController
from within thedashboards.tpl.html
and use it just as you would expect. I also see it in the Chrome devtools:However, when I directly reference the messages module from the
app.js
file like here: https://github.com/juristr/angular-systemjs-seed/blob/adding-module/src/app/app.js#L9..the app breaks. Often it doesn't even load properly and if it does, I don't get any error but the
MessageController
doesn't seem to be loaded. At least I cannot for instance use it in theindex.html
as I would expect.To reproduce it easily, I pushed my
adding-module
branch up on my GitHub account: https://github.com/juristr/angular-systemjs-seed/tree/adding-moduleAny hints? I'm quite sure I am just missing something here...