https://github.com/sis0k0/lazyninjas
https://github.com/sis0k0/lazyninjas
angular lazy-loading nativescript
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sis0k0/lazyninjas
- Owner: sis0k0
- Created: 2016-11-30T09:29:09.000Z (over 8 years ago)
- Default Branch: aot
- Last Pushed: 2019-01-27T10:35:13.000Z (over 6 years ago)
- Last Synced: 2025-03-30T21:51:10.916Z (3 months ago)
- Topics: angular, lazy-loading, nativescript
- Language: JavaScript
- Size: 2.05 MB
- Stars: 25
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# 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](https://www.nativescript.org/blog/optimizing-app-loading-time-with-angular-2-lazy-loading) article.
# Installation
Start by cloning the repo:
```bash
$ git clone https://github.com/sis0k0/lazyNinjas.git
$ cd lazyNinjas
```Then, install the NativeScript CLI:
```bash
npm i -g nativescript
```Now, you can use the `preview` command to build and start the app:
```bash
$ tns preview
```If you want to bundle the app with webpack, append the `--bundle` flag:
```bash
$ tns preview --bundle
```# Branches
## Recommended:
1. The [**aot** branch](https://github.com/sis0k0/lazyNinjas/tree/aot) shows how to use a single lazy module.
1. The [**nested-lazy-modules** branch](https://github.com/sis0k0/lazyNinjas/tree/nested-lazy-modules) shows how to set up a module hierarchy with nested lazily loaded NgModules.
## Deprecated:
1. The [**callback-loading** branch](https://github.com/sis0k0/lazyNinjas/tree/callback-loading) shows how to lazy load modules by passing a callback function to the `loadChildren` properties in the router configuration.2. The [**custom-module-loader** branch](https://github.com/sis0k0/lazyNinjas/tree/custom-module-loader) shows how to extract the loading logic to a custom module loader.