Giter VIP home page Giter VIP logo

angularsample's Introduction

Sample Angular App Lazy loading from different package

This is a sample app with 2 sub-packages.

  1. packages/main.app
  2. packages/library

the goal is to have a library package with different modules of the app and have some specific modules lazy loaded.

root package.json

The root package.json has some scripts and dependencies to install, build and launch the packages within the packages folder.

Every package is a independent project that can be in a different repo and the plan is to publish each package to its own NPM.

main.app

This will be the entry point for the application and will import all the library packages and consume them.

To consume a library package we need the next steeps:

  1. A dependency to the package has to be installed and added to this project package.json.
  2. A route is needed in the file packages/main.app/src/app/app.module.ts to be able to call all the child routes included in the library/package.

running the app

  1. clone the repo
  2. npm install
  3. npm run dev:library

this will install all dependencies, compile the library, install the library in the main.app and build the main.app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.