I have just gone through tutorial of angular-meteor (socially) and angular 2 (https://angular.io/docs/ts/latest/guide/router.html). In the angular2 guide, they have mentioned how to create submodules (features) and then how it can be easily imported into the app.module.ts. But the issue here is that in meteor-app there is no such app.module.ts and instead they have app.main.ts and in it there is the bootstrap class which tells the entry point in the app. It takes only a component and providers. Please tell me how can we add submodules (features) in the angular-meteor.
I also want to know how to do lazy loading in route configuration as mention here ((https://angular.io/docs/ts/latest/guide/router.html))
How to add features in angular-meteor (using angular2) and to do lazy-loading in route configuration
Unfortunately meteor doesn’t support lazy loading of modules yet? We hope it will be included in the future. I managed to solve this issue.
If you have something like this:
{ path: 'mypath', loadchildren: 'app/myapp/myapp.module#MyAppModule' }
You will have an error saying that System is not defined, or something like this.
You can use instead:
{ path: 'mypath', loadchildren: ()=> require('./myapp/myapp.module')['MyAppModule'] }
Give it a shot…
If you use meteor-client-bundler
to package the Atmosphere packages you’re using in your Angular client application, you can then build it with Angular CLI, which does support lazy-loading modules.