Skip to content

Nx Workspace demo to share ngrx-based logic (state, action and reducers) between Ionic3 and Angular5 apps

Notifications You must be signed in to change notification settings

vadost/ngrx-demo-workspace

 
 

Repository files navigation

Introduction

This is a proof of concept that demonstrates the ability to share core functionalities and ngrx-based business logic between an Angular5 web app and an Ionic3 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:

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 --app=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 dependencies and typings (you can get a burger...)
npm i

# Run the mobile app locally
ionic serve

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 version 1.5.0 using Nrwl Nx.

About

Nx Workspace demo to share ngrx-based logic (state, action and reducers) between Ionic3 and Angular5 apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 51.3%
  • JavaScript 17.9%
  • CSS 17.8%
  • HTML 13.0%