{"id":17854761,"url":"https://github.com/actionanand/ngrx-module-based","last_synced_at":"2026-05-17T17:10:19.064Z","repository":{"id":258410392,"uuid":"873866389","full_name":"actionanand/ngrx-module-based","owner":"actionanand","description":"NgRx with NgModule","archived":false,"fork":false,"pushed_at":"2024-10-18T08:10:36.000Z","size":544,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-13T01:29:59.934Z","etag":null,"topics":["angular","angular18","angular2","ngrx"],"latest_commit_sha":null,"homepage":"https://actionanand.github.io/ngrx-module-based/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actionanand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T21:17:51.000Z","updated_at":"2024-10-18T08:09:55.000Z","dependencies_parsed_at":"2024-10-20T02:07:25.327Z","dependency_job_id":null,"html_url":"https://github.com/actionanand/ngrx-module-based","commit_stats":null,"previous_names":["actionanand/ngrx-module-based"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/actionanand/ngrx-module-based","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fngrx-module-based","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fngrx-module-based/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fngrx-module-based/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fngrx-module-based/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actionanand","download_url":"https://codeload.github.com/actionanand/ngrx-module-based/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fngrx-module-based/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33147342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","angular18","angular2","ngrx"],"created_at":"2024-10-28T01:04:06.496Z","updated_at":"2026-05-17T17:10:19.044Z","avatar_url":"https://github.com/actionanand.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular - NgRx with NgModule\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.3.\n\n## Adding NgRx to Angular Project\n\n```sh\nng add @ngrx/store\n```\n\n### Adding effects\n\n```sh\nng add @ngrx/effects\n```\n\n### Adding @ngrx/operators\n\nThe concatLatestFrom operator has been moved from `@ngrx/effects` to `@ngrx/operators`. If you're looking for the older documentation (prior to v18), see the [v17 documentation](https://v17.ngrx.io/guide/effects/operators#concatlatestfrom).\n\nThe `concatLatestFrom` operator functions similarly to `withLatestFrom` with one important difference - it lazily evaluates the provided Observable factory.\n\n```bash\nng add @ngrx/operators\n```\n\n## Cloning Guide\n\n1.  Clone only the remote primary HEAD (default: origin/master)\n\n```bash\ngit clone \u003curl\u003e --single-branch\n```\n\n2. Only specific branch\n\n```bash\ngit clone \u003curl\u003e --branch \u003cbranch\u003e --single-branch [\u003cfolder\u003e]\n```\n\n```bash\ngit clone \u003curl\u003e --branch \u003cbranch\u003e\n```\n\n3. Cloning repositories using degit\n\n   - master branch is default.\n\n```bash\nnpx degit github:user/repo#branch-name \u003cfolder-name\u003e\n```\n\n4. Cloning this project with skeleton\n\n```bash\ngit clone https://github.com/actionanand/ngrx-module-based.git --branch 1-skeleton angular-proj-name\n```\n\n```bash\nnpx degit github:actionanand/ngrx-module-based#1-skeleton angular-proj-name\n```\n\n## Automate using `Prettier`, `Es Lint` and `Husky`\n\n1. Install the compatible node version\n\n```bash\n  nvm install v20.13.1\n```\n\n2. Install and Configure Prettier\n\n   - Install prettier as below:\n\n   ```bash\n     yarn add prettier -D\n   ```\n\n   - Create a `.prettierrc` file and write down the format as below: - [online ref](https://prettier.io/docs/en/options.html)\n\n   ```yml\n   trailingComma: 'all'\n   tabWidth: 2\n   useTabs: false\n   semi: true\n   singleQuote: true\n   bracketSpacing: true\n   bracketSameLine: true\n   arrowParens: 'avoid'\n   printWidth: 120\n   overrides:\n     - files:\n         - '*.js'\n         - '*.jsx'\n       options:\n         bracketSpacing: true\n         jsxSingleQuote: true\n         semi: true\n         singleQuote: true\n         tabWidth: 2\n         useTabs: false\n     - files:\n         - '*.ts'\n       options:\n         tabWidth: 2\n   ```\n\n   - Create a `.prettierignore` file and write as below(sample)\n\n   ```gitignore\n   # Ignore artifacts:\n   build\n   coverage\n   e2e\n   node_modules\n   dist\n   dest\n   reports\n\n   # Ignore files\n   *.lock\n   package-lock.json\n   yarn.lock\n   ```\n\n3. Install `Es Lint`, if not installed\n\n```bash\nng add @angular-eslint/schematics\n```\n\nif error comes, use the below command\n\n```shell\nng add @angular-eslint/schematics@next\n```\n\n4. Configure pre-commit hooks\n\nPre-commit hooks are a nice way to run certain checks to ensure clean code. This can be used to format staged files if for some reason they weren’t automatically formatted during editing. [husky](https://github.com/typicode/husky) can be used to easily configure git hooks to prevent bad commits. We will use this along with [pretty-quick](https://github.com/azz/pretty-quick) to run Prettier on our changed files. Install these packages, along with [npm-run-all](https://github.com/mysticatea/npm-run-all), which will make it easier for us to run npm scripts:\n\n```bash\nyarn add husky pretty-quick npm-run-all -D\n```\n\nTo configure the pre-commit hook, simply add a `precommit` npm script. We want to first run Prettier, then run TSLint on the formatted files. To make our scripts cleaner, I am using the npm-run-all package, which gives you two commands, `run-s` to run scripts in sequence, and `run-p` to run scripts in parallel:\n\n```json\n  \"precommit\": \"run-s format:fix lint\",\n  \"format:fix\": \"pretty-quick --staged\",\n  \"format:check\": \"prettier --config ./.prettierrc --list-different \\\"src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}\\\"\",\n  \"format:all\": \"prettier --config ./.prettierrc --write \\\"src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}\\\"\",\n  \"lint\": \"ng lint\",\n```\n\n5. Initialize husky\n\n   - Run it once\n\n   ```bash\n     npm pkg set scripts.prepare=\"husky install\"\n     npm run prepare\n   ```\n\n   - Add a hook\n\n   ```bash\n     npx husky add .husky/pre-commit \"yarn run precommit\"\n     npx husky add .husky/pre-commit \"yarn test\"\n     git add .husky/pre-commit\n   ```\n\n   - Make a commit\n\n   ```bash\n     git commit -m \"Keep calm and commit\"\n     # `yarn run precommit and yarn test` will run every time you commit\n   ```\n\n6. How to skip prettier format only in particular file\n\n   1. JS\n\n   ```js\n   matrix(1, 0, 0, 0, 1, 0, 0, 0, 1);\n\n   // prettier-ignore\n   matrix(\n       1, 0, 0,\n       0, 1, 0,\n       0, 0, 1\n     )\n   ```\n\n   2. JSX\n\n   ```jsx\n   \u003cdiv\u003e\n     {/* prettier-ignore */}\n     \u003cspan     ugly  format=''   /\u003e\n   \u003c/div\u003e\n   ```\n\n   3. HTML\n\n   ```html\n   \u003c!-- prettier-ignore --\u003e\n   \u003cdiv         class=\"x\"       \u003ehello world\u003c/div            \u003e\n\n   \u003c!-- prettier-ignore-attribute --\u003e\n   \u003cdiv (mousedown)=\"       onStart    (    )         \" (mouseup)=\"         onEnd      (    )         \"\u003e\u003c/div\u003e\n\n   \u003c!-- prettier-ignore-attribute (mouseup) --\u003e\n   \u003cdiv (mousedown)=\"onStart()\" (mouseup)=\"         onEnd      (    )         \"\u003e\u003c/div\u003e\n   ```\n\n   4. CSS\n\n   ```css\n   /* prettier-ignore */\n   .my    ugly rule\n     {\n   \n     }\n   ```\n\n   5. Markdown\n\n   ```md\n     \u003c!-- prettier-ignore --\u003e\n\n   Do not format this\n   ```\n\n   6. YAML\n\n   ```yml\n   # prettier-ignore\n   key  : value\n     hello: world\n   ```\n\n   7. For more, please [check](https://prettier.io/docs/en/ignore.html)\n\n## Resources\n\n- [GitHub Actions for Angular](https://github.com/rodrigokamada/angular-github-actions)\n- [Angular 16 - milestone release](https://github.com/actionanand/ng16-signal-milestone-release)\n\n## Wiki\n\n![image](https://github.com/user-attachments/assets/08423d55-ec09-46b6-bb21-0c5b678c3801)\n\n1. [Reading your Application State using Selectors](https://angular-training-guide.rangle.io/state-management/ngrx/reading_your_application_state_using_selectors)\n2. [You should take advantage of the improved NgRx APIs](https://timdeschryver.dev/blog/you-should-take-advantage-of-the-improved-ngrx-apis#)\n3. [perfect selector : Do's and Dont's - NgRx Official](https://ngrx.io/guide/eslint-plugin/rules/prefer-selector-in-select)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionanand%2Fngrx-module-based","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factionanand%2Fngrx-module-based","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionanand%2Fngrx-module-based/lists"}