{"id":18994441,"url":"https://github.com/benorama/ngrx-demo-apps","last_synced_at":"2025-04-22T12:49:20.062Z","repository":{"id":65458299,"uuid":"61285150","full_name":"benorama/ngrx-demo-apps","owner":"benorama","description":"Demo to share module (ngrx state and reducers) between Ionic and Angular apps","archived":false,"fork":false,"pushed_at":"2017-07-22T08:56:43.000Z","size":4417,"stargazers_count":37,"open_issues_count":1,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T01:36:57.988Z","etag":null,"topics":["angular","ionic","ngrx","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benorama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-16T10:48:08.000Z","updated_at":"2022-11-26T22:43:55.000Z","dependencies_parsed_at":"2023-01-24T14:45:13.124Z","dependency_job_id":null,"html_url":"https://github.com/benorama/ngrx-demo-apps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benorama%2Fngrx-demo-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benorama%2Fngrx-demo-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benorama%2Fngrx-demo-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benorama%2Fngrx-demo-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benorama","download_url":"https://codeload.github.com/benorama/ngrx-demo-apps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250243643,"owners_count":21398376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","ionic","ngrx","typescript"],"created_at":"2024-11-08T17:25:34.921Z","updated_at":"2025-04-22T12:49:20.002Z","avatar_url":"https://github.com/benorama.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Introduction\n\nThis is a proof of concept that demonstrates the ability to share a Typescript package with core functionalities and business logic between an Angular web app and an Ionic mobile app.\n\nPlease check the Medium article [Hybrid mobile apps: sharing logic between Angular and Ionic apps](https://medium.com/@benorama/hybrid-mobile-apps-sharing-logic-between-angular2-and-ionic2-apps-7c32145b90d5#.m1x3vpyc0) for more info.\n\n![Demo](https://cloud.githubusercontent.com/assets/394356/24591063/344c55ee-17f9-11e7-82ca-96821ac723b7.png)\n\n**Goals:**\n\n* encapsulate all the business logic in a core module, based on [@ngrx/store](https://github.com/ngrx/store),\n* keep specific view layout, markup and navigation logic in the app projects.\n\nNote: [@ngrx/store](https://github.com/ngrx/store) is a RxJS powered state management inspired by Redux for Angular apps. \nIt's currently the most popular way to structure complex business logic in Angular apps.\n\n\n## Running the apps locally\n\n```\n# Clone the repo\ngit clone https://github.com/benorama/ngrx-demo-apps.git\n```\n\nPrerequisites:\n* [Typescript 2.0+](https://www.typescriptlang.org/index.html#download-links)\n* [Angular CLI](https://cli.angular.io)\n* [Ionic CLI](http://ionicframework.com/docs/cli/)\n\nNote: `ngrx-demo-core` module is shared between the apps with `npm link` but it could be published to `npmjs` and be used as a regular dependency.\n\n### ngrx-demo-core module\n\nFirst, compile `ngrx-demo-core` shared module. \n\nIt is based on official Ionic module template, which supports Angular's ngc and Ahead-of-Time compiling out of the box.\nhttps://github.com/driftyco/ionic-module-template\n\n```\n# Go into core module directory\ncd ngrx-demo-apps/core\n\n# Install dependencies\nyarn\n# Or npm install\n\n# Compile typescript into dist\nyarn build\n# Or npm run build\n\nyarn link\n# Or npm pack\n# Or npm publish\n\n# Note: during dev, you can use 'tsc -w'\n```\n\nThe shared module is now installed locally and can be used in other local npm projects.\n\n### ngrx-demo-web app\n\nInstall or link `ngrx-demo-core` shared module and run the web app.\n\n```\n# Go into web Angular2 app directory\ncd ../web\n\n# Install dependencies\nyarn\n# Or npm install\n\n# Create a symlink from the local node_modules folder to the global shared module symlink\nyarn link \"ngrx-demo-core\"\n# Or npm install ../core/ngrx-demo-core-0.0.1.tgz (if you used npm pack)\n\n# Run the web app locally\nng serve\n```\n\n### ngrx-demo-mobile app\n\nAs we did for the web app, install or link the `ngrx-demo-core` shared module and run the mobile app.\n\n```\n# Go into mobile Ionic2 app directory\ncd ../mobile\n\n# Install dependencies and typings (you can get a burger...)\nyarn\n# Or npm install\n\n# Create a symlink from the local node_modules folder to the global shared module symlink\nyarn link \"ngrx-demo-core\"\n# Or npm install ../core/ngrx-demo-core-0.0.1.tgz (if you used npm pack)\n\n# Run the mobile app locally\nionic serve\n```\n\nNote: for more info on using external lib on Ionic2\n* [Third Party libraries in Ionic Apps](http://ionicframework.com/docs/v2/resources/third-party-libs/)\n* [App Scripts](http://ionicframework.com/docs/v2/resources/app-scripts/)\n\n## Bugs and feedback\n\nIf you have any questions or suggestions to improve the demo app, don't hesitate to submit an issue or a pull request!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenorama%2Fngrx-demo-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenorama%2Fngrx-demo-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenorama%2Fngrx-demo-apps/lists"}