{"id":18749608,"url":"https://github.com/scotch-io/angular-router-1x","last_synced_at":"2025-10-13T09:09:50.304Z","repository":{"id":27838854,"uuid":"31328912","full_name":"scotch-io/angular-router-1x","owner":"scotch-io","description":"Testing the new Angular router in 1.x applications.","archived":false,"fork":false,"pushed_at":"2015-05-08T16:57:04.000Z","size":908,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-20T10:45:07.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://slides.com/chrissevilleja/ng-vegas-router","language":"JavaScript","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/scotch-io.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":"2015-02-25T18:24:57.000Z","updated_at":"2018-05-15T13:32:45.000Z","dependencies_parsed_at":"2022-07-08T10:51:27.851Z","dependency_job_id":null,"html_url":"https://github.com/scotch-io/angular-router-1x","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scotch-io/angular-router-1x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotch-io%2Fangular-router-1x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotch-io%2Fangular-router-1x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotch-io%2Fangular-router-1x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotch-io%2Fangular-router-1x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scotch-io","download_url":"https://codeload.github.com/scotch-io/angular-router-1x/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotch-io%2Fangular-router-1x/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014483,"owners_count":26085535,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-07T17:08:00.678Z","updated_at":"2025-10-13T09:09:50.272Z","avatar_url":"https://github.com/scotch-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular New Router in 1.x Apps\n\n[Presentation Video](https://www.youtube.com/watch?v=DGT3Htcqygk)\n\n[Presentation Slides](http://slides.com/chrissevilleja/ng-vegas-router)\n\nAn experiment in using the new Angular 2.0 router in Angular 1.x applications. The new router is backwards compatible and provides lots of fun features.\n\n## What's this Repo About?\n\nUpgrading an application from UI-Router to Component Router. This helps get us ready for Angular 2.0\n\n[Angular Component Router](https://github.com/angular/router)\n\n*NOTE: The router is not finalized yet so this code may have to change as the router is updated.*\n\n**Why use the new router in 1.x applications?** There are many planned features in the router that will help build out easier and more scalable Angular apps, whether it be 1.x or 2.x.\n\n- Conventions and defaults\n- Customizable at almost every point\n- Nested routers (and nested encapsulated apps with their own routers)\n- Dynamic route generation\n- Lazy-loaded components\n\n## Requirements\n\nFor this repository, we are creating a server with Node and serving the application.\n\n- [node and npm](http://nodejs.org)\n\n## Installation\n\n1. Install dependencies: `npm install`\n2. Start the server: `node server.js`\n3. View application in browser: [http://localhost:8080](http://localhost:8080)\n\n## Upgrading\n\n### Add Component Router dependencies\n\n```\n\u003cscript src=\"libs/router.es5.js\"\u003e\u003c/script\u003e\n```\n\n### Inject Component Router into our App\n\n```\napp.module('app', [\n\t\t'app.home',\n\t\t'app.about',\n\t\t'ngComponentRouter'\n\t])\n```\n\n### Add Configuration\n\n```\nfunction MainController($router) {\n\t$router.config([\n\t\t{ path: '/', component: 'home' },\n\t\t{ path: '/about', component: 'about' }\n\t]);\n}\n```\n\n### Tell Component Router where to find views\n\n```\napp.module('app', [...])\n\t.config(function($componentLoaderProvider) {\n\t\t$componentLoaderProvider(function(name) {\n\t\t\treturn './views/' + name + '.html';\n\t\t});\n\t});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscotch-io%2Fangular-router-1x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscotch-io%2Fangular-router-1x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscotch-io%2Fangular-router-1x/lists"}