{"id":26894112,"url":"https://github.com/ngrx/router","last_synced_at":"2025-04-08T03:08:47.513Z","repository":{"id":57130702,"uuid":"52565059","full_name":"ngrx/router","owner":"ngrx","description":"Reactive Router for Angular","archived":false,"fork":false,"pushed_at":"2016-09-14T19:27:33.000Z","size":508,"stargazers_count":269,"open_issues_count":0,"forks_count":34,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-31T23:59:54.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/ngrx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-25T23:44:35.000Z","updated_at":"2024-08-08T15:17:33.000Z","dependencies_parsed_at":"2022-09-10T22:31:41.330Z","dependency_job_id":null,"html_url":"https://github.com/ngrx/router","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrx%2Frouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrx%2Frouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrx%2Frouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrx%2Frouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngrx","download_url":"https://codeload.github.com/ngrx/router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767234,"owners_count":20992547,"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":[],"created_at":"2025-03-31T23:59:58.395Z","updated_at":"2025-04-08T03:08:47.477Z","avatar_url":"https://github.com/ngrx.png","language":"TypeScript","readme":"# @ngrx/router\n\n**This project is DEPRECATED**\n\nThe [Angular 2 Router](https://angular.io/docs/ts/latest/guide/router.html) was inspired by the ngrx/router, shares a familiar API and will be updated going forward. The ngrx/router may continue to live on as a framework agnostic router with more experimental features.\n\n[Migration Guide to Angular Router](./docs/overview/migration.md)\n\n### Reactive Router for Angular 2\n[![npm version](https://badge.fury.io/js/%40ngrx%2Frouter.svg)](https://badge.fury.io/js/%40ngrx%2Frouter)\n\nThis is an alternative router for Angular 2 focused on providing a simple, reactive API built to scale for large applications.\n\nPlease note that we are currently in _beta_. We believe the core of the router is solid and we do not expect anymore breaking changes to the API.\n\n### Installation\nInstall @ngrx/router and @ngrx/core into your Angular 2 project via npm:\n\n```\nnpm install @ngrx/router @ngrx/core --save\n```\n\n### Routing Setup\n\n1. Create your application components:\n\n  ```ts\n  import { Component } from '@angular/core';\n\n  @Component({\n    selector: 'app',\n    template: `\n      \u003ch1\u003eMy Blog\u003c/h1\u003e\n      \u003cnav\u003e\n        \u003ca linkTo=\"/\"\u003eHome\u003c/a\u003e\n        \u003ca linkTo=\"/blog\"\u003eBlog\u003c/a\u003e\n      \u003c/nav\u003e\n\n      \u003croute-view\u003e\u003c/route-view\u003e\n    `\n  })\n  class App { }\n\n  @Component({\n    selector: 'home-page',\n    template: `\n      \u003ch2\u003eHome Page\u003c/h2\u003e\n    `\n  })\n  class HomePage { }\n\n  @Component({\n    selector: 'blog-page',\n    template: `\n      \u003ch2\u003eBlog\u003c/h2\u003e\n      \u003cnav\u003e\n        \u003ca *ngFor=\"let post of posts\" [linkTo]=\"'/blog/' + post.id\"\u003e{{ post.title }}\u003c/a\u003e\n      \u003c/nav\u003e\n\n      \u003croute-view\u003e\u003c/route-view\u003e\n    `\n  })\n  class BlogPage { }\n\n  @Component({\n    selector: 'post-page',\n    template: `\n      \u003ch3\u003ePost\u003c/h3\u003e\n    `\n  })\n  class PostPage { }\n  ```\n2. Configure your application routes:\n\n  ```ts\n  import { Routes } from '@ngrx/router';\n\n  const routes: Routes = [\n    {\n      path: '/',\n      component: HomePage\n    },\n    {\n      path: '/blog',\n      component: BlogPage,\n      children: [\n        {\n          path: ':id',\n          component: PostPage\n        }\n      ]\n    }\n  ]\n  ```\n\n3. Register router in application bootstrap.\n\n  ```ts\n  import { provideRouter } from '@ngrx/router';\n\n  bootstrap(App, [\n    provideRouter(routes)\n  ]);\n  ```\n\nThat's it! You are ready to begin taking advantage of reactive routing!\n\n### Documentation\n\n* [Location Strategy](./docs/overview/location-strategy.md)\n* [Route Configuration](./docs/overview/route.md)\n* [Route Links](./docs/overview/links.md)\n* [Router Navigation](./docs/overview/navigation.md)\n* [Redirects](./docs/overview/redirect.md)\n* [Code Splitting](./docs/overview/code-splitting.md)\n* [Route and Query Parameters](./docs/overview/params.md)\n* [Guarding Routes](./docs/overview/guards.md)\n* [SystemJS Configuration](./docs/overview/systemjs.md)\n* [Webpack Configuration](./docs/overview/webpack.md)\n* [Angular CLI Configuration](./docs/overview/angular-cli.md)\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngrx%2Frouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngrx%2Frouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngrx%2Frouter/lists"}