Routing and Lazy Loading

Routing is essential to the solid usability flow of any app. Let's understand the key elements of routing configuration for a mobile app that takes advantage of all the flexibility Angular's router gives us.

In this chapter, we will be covering the following topics:

  • Configuring the Angular Router with a NativeScript app
  • Lazy loading modules by route
  • Provide NSModuleFactoryLoader for Angular's NgModuleFactoryLoader
  • Understanding how to use router-outlet in conjunction with page-router-outlet
  • Learn how to share singleton services across multiple lazy loaded modules
  • Using auth guards to protect views that require valid authentication
  • Learn about NavigationButton to customize back mobile navigation
  • Take advantage of ...

Get NativeScript for Angular Mobile Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.