{"id":20696733,"url":"https://github.com/engichang1467/ngxs-tutorial","last_synced_at":"2026-04-24T13:05:07.208Z","repository":{"id":113302596,"uuid":"337938044","full_name":"engichang1467/NGXS-Tutorial","owner":"engichang1467","description":"Learning how to use state management (NGXS) in Angular","archived":false,"fork":false,"pushed_at":"2021-02-11T05:49:56.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-17T18:29:30.531Z","etag":null,"topics":["angular","ngxs","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/engichang1467.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-11T05:25:34.000Z","updated_at":"2021-02-11T06:27:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc2a47a8-f5f6-4bc5-a1c6-9158aa5a6dca","html_url":"https://github.com/engichang1467/NGXS-Tutorial","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/engichang1467%2FNGXS-Tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engichang1467%2FNGXS-Tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engichang1467%2FNGXS-Tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engichang1467%2FNGXS-Tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engichang1467","download_url":"https://codeload.github.com/engichang1467/NGXS-Tutorial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961754,"owners_count":20213315,"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","ngxs","typescript"],"created_at":"2024-11-17T00:15:02.376Z","updated_at":"2026-04-24T13:05:02.177Z","avatar_url":"https://github.com/engichang1467.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGXS Tutorial\n\nLearning how to use state management (NGXS) in Angular.\n\n## State Management Concepts\n\n* Action\n\n    - A command which should trigger something to happen\n\n    - the result of something that has already happened\n\n```Typescript\nexport class AddTutorial {\n    static readonly type = '[TUTORIAL] Add';\n\n    constructor(public payload: Tutorial) {}\n}\n\n// Tutorial is a model\n```\n\n* Store\n\n    - A global state manager that represents our app's entire data state tree\n\n        - We change the state of the store by disatching actions\n\n* State\n\n    - classes along with decorators to describe metadata and action mappings\n\n```Typescript\n@State\u003cTutorialStateModel\u003e({\n    name: 'tutorials',\n    defaults: {\n        tutorials: []\n    }\n})\n\nexport class TutorialState {}\n```\n\n* Select\n\n    - functions that slice a specific portion of the state from the global state container.\n\n```Typescript\n@Selector()\nstatic getTutorials(state: TutorialStateModel) {\n    return state.tutorials;\n}\n```\n\nThis sample Angular app takes in the name and url of a tutorial, and present it in hyperlink format once the user submit.\n\n## References\n\n- [Link for the tutorials](https://www.youtube.com/watch?v=SfiO3bDUK7Q)\n\n- [Frontend State Management](https://nitin15j.medium.com/frontend-state-management-44169546a2f7)\n\n- [Introduction to NGXS - Angular State Management](https://medium.com/front-end-weekly/introduction-to-ngxs-angular-state-management-2516b2d9917e)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengichang1467%2Fngxs-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengichang1467%2Fngxs-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengichang1467%2Fngxs-tutorial/lists"}