CopyPastor

Detecting plagiarism made easy.

Score: 0.7542693018913269; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-07-05
by ORBIT

Original Post

Original - Posted on 2019-04-16
by abhay



            
Present in both answers; Present only in the new answer; Present only in the old answer;

**Use lazy loading**
[tutorial check this out][1]
With lazy loading we can split our application to feature modules and load them on-demand. The main benefit is that initially we can only load what the user expects to see at the start screen. The rest of the modules are only loaded when the user navigates to their routes.


Check out this Victor Savkin's blog post [this][2]for more in-depth information about lazy loading.
Using lazy loading with `NativeScript` The `Angular` `built-in` module loader uses `SystemJS`. However, when developing `NativeScript` apps we don't have to set up `SystemJS` to create lazy loaded modules. We can use the NativeScript module loader, distributed with NativeScript Angular (the recommended way), write our own module loader or not use a module loader for lazy loading at all.
In the following sections we will use the simple lazyNinjas app which has two modules - the HomeModule (not lazy loaded) and the NinjasModule (lazy loaded). We'll cover the different methods for enabling lazy loading in the next sections. Take a minute to make yourself familiar with the ninjas - download the app from github and run it.

[1]: https://medium.com/@williamjuan027/nativescript-angular-lazy-loading-modals-e56451392c8d [2]: https://vsavkin.com/angular-router-declarative-lazy-loading-7071d1f203ee
The exact reason why this particular issue is being faced is because of your server settings.
So when you implement the application there are certain steps that you will have to take. One of the essential steps is to mark a particular segment of your path say: http://domain-name/main where **main** being the path segment must be used as the identifier in your server settings say your **server.js** or **app.js** when it comes to a node backend or a **webconfig** file for IIS and Tomcat deployment.
The reason for marking a particular segment is so that when the server receives any request with that particular segment + additional you reroute it to your application in www or public folder for the angular router to kick in.
This process is known as **url rewriting**. Hence if the web server or the app server depending on the application size is not under your control then please use **hashLocationStratergy** else it is always neat to use **pathLocationStartergy** as it is helpful when it comes to history tracking and other aesthetic and performance benefits.
To read more on this you can visit these links:
**For IIS**: https://blog.angularindepth.com/deploy-an-angular-application-to-iis-60a0897742e7

        
Present in both answers; Present only in the new answer; Present only in the old answer;