V
V
Vitaly2016-12-17 20:12:52
Angular
Vitaly, 2016-12-17 20:12:52

How to give away an Angular 2 (or React) web application piece by piece?

The idea is as follows: applications on Angular 2 would like to be loaded in parts (modules needed at a given time) in order to increase page loading speed. Can this be done with the available funds? There are examples for the first version:
https://habrahabr.ru/post/178753/
It will also be interesting to know the implementation in React.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SergeyBugai, 2016-12-17
@vitali1995

That's what lazy loading is for.
In the routes you need to write something like this

{ path: '',
    loadChildren: './view/view.module#ViewModule'
    //component: ViewComponent
  }

Here is a good read blog.dmbcllc.com/angular-2-lazy-loading

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question