问题描述:

I'm currently planning to develop a large scale app using angular2 my problem is now the architecture, I have tested some Seeds :

Github seed Project

https://github.com/mgechev/angular2-seed

but they aren't good for my large scale app because you pack anything together in on big file(OK minified but still all).

An other point is the necessary es6 shims which are to big.

is there a good technique to load the necessary components/modules only if the page needs them and only load the es6 shims if the browser (IE) needs them?

Example :

Example Project

includes only code for blue socks I don't want to know the e.g css stuff for red sock.

every site should only be like 1Mb doesn't matter if my whole app is big like 1GB

网友答案:

I think that is what you are looking for: http://blog.mgechev.com/2015/09/30/lazy-loading-components-routes-services-router-angular-2

相关阅读:
Top