Somehow Webpack messes up my code which was working with beta11.
It seems that it can’t handle circular dependencies: https://github.com/webpack/webpack/issues/1788
I’m guessing this is the problem with my app, as sometimes an import just returns undefined.
I still cannot upgrade to RC2 and stick with beta11.
Somehow i wonder if i will ever be able to upgrade to a RC Version.
Why not stick with browserify, everything was working fine…
Update:
It is really related to WebPack having problems with circular imports. (which have nothing to do with angular circular dependencies at runtime).
But it is a problem for my app and the way Ionic also works, here’s the problem:
I have a ActionCommands service that is used by many pages to execute common actions.
Inside the ActionCommands service i also have to include several pages for modals etc. to be opened upon triggering an action.
However these pages need again the ActionsCommands service to trigger further actions.
Here’s is the circularity with importing.
BUT: There is no circularity with runtime dependencies, because the Pages imported inside the ActionsCommands service are only used to create a modal out of it.
Solution needed:
Lazy import / create a modal from a page.
OR
Create a modal by a string e.g. the name of the page, so the page does not have to get imported (by webpack)
What are the suggestions. I guess this will be a huge problem. I have read the angular 2 router has some kind of lazy loading modules.