Code Monkey home page Code Monkey logo

ngrx-demo-workspace's Introduction

Introduction

This is a proof of concept that demonstrates the ability to share core functionalities and ngrx-based business logic between an Angular7 web app and an Ionic4 mobile app.

It is based on a Nx Workspace mono-repo project structure (from Nrwl.io Nx Extensions, an open source toolkit for enterprise Angular applications).

Please check the Medium article Sharing (Ngrx-based) logic between Angular5 web app and Ionic3 mobile app for more info.

Demo

Goals:

  • encapsulate all the business logic in a core module, based on @ngrx/store,
  • keep specific view layout, markup and navigation logic in the app projects.

Note: @ngrx/store is a RxJS powered state management inspired by Redux for Angular apps. It's currently the most popular way to structure complex business logic in Angular apps.

Running the apps locally

# Clone the repo
git clone https://github.com/benorama/ngrx-demo-workspace.git

Prerequisites, latest version of:

WARNING: in order to be able to support Ionic multi-app projects, you'll need the latest Ionic CLI (4.3.0+, with npm install -g ionic@latest) and latest NodeJS (v10+)

Web app

To run web app, we use the root Nx Project package and Angular CLI.

# Install dependencies
npm i

# Run the web app locally
ng serve web

Mobile app

To run mobile app, we use the mobile app Ionic package and Ionic CLI.

# Go into mobile Ionic app directory
cd ./apps/mobile

# Install mobile dependencies (you can get a burger...)
npm i
cd ../..

# Run the mobile app locally
ionic serve
# Or
ng serve mobile

Bugs and feedback

If you have any questions or suggestions to improve the demo app, don't hesitate to submit an issue or a pull request!


This project was generated with Angular CLI using Nrwl Nx.

ngrx-demo-workspace's People

Contributors

benorama avatar edento avatar roelgo avatar

Watchers

 avatar

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.