ws-guide / lazyNinjas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lazy Ninjas

Lazy Ninjas is a simple NativeScript-Angular application, demonstrating several implementations of lazy loaded modules. Please check out the Optimizing app loading time with Angular Lazy Loading article.

Installation

This app is built with the NativeScript CLI. Once you have the CLI installed, start by cloning the repo:

$ git clone https://github.com/sis0k0/lazyNinjas.git
$ cd lazyNinjas

Then, use the CLI to run the app:

$ tns run [ios|android]

The aot and nested-lazy-modules are set up to use webpack. To bundle the app use:

$ npm run start-[ios|android]-bundle

Branches

This repo has several branches:
  • The aot branch shows how to use lazy loaded modules with NSModuleFactoryLoader and is webpack/AoT enabled.
  • The nested-lazy-modules branch shows how to set up a module hierarchy with nested lazy loaded NgModules.
  • The callback-loading branch shows how to lazy load modules by passing a callback function to the loadChildren properties in the router configuration.
  • The custom-module-loader branch shows how to extract the loading logic to a custom module loader.

About


Languages

Language:JavaScript 53.6%Language:TypeScript 38.5%Language:CSS 5.6%Language:HTML 2.3%