{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/4319","labels_url":"https://api.github.com/repos/angular/angular/issues/4319/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/4319/comments","events_url":"https://api.github.com/repos/angular/angular/issues/4319/events","html_url":"https://github.com/angular/angular/issues/4319","id":107792507,"number":4319,"title":"feat(router): provide RouteConfig object for AuxRoute","user":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20router","name":"comp: router","color":"c7def8"},{"url":"https://api.github.com/repos/angular/angular/labels/effort1:%20easy%20(hour)","name":"effort1: easy (hour)","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular/labels/P3:%20important","name":"P3: important","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular/labels/type:%20feature","name":"type: feature","color":"EEEEEE"},{"url":"https://api.github.com/repos/angular/angular/labels/type:%20RFC%20/%20discussion%20/%20question","name":"type: RFC / discussion / question","color":"EEEEEE"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-22T20:15:07Z","updated_at":"2015-09-23T07:45:33Z","closed_at":null,"body":"Right now, you must do:\r\n\r\n```\r\n@RouteConfig([\r\n  new AuxRoute({ path: '/foo', component: FooCmp })\r\n])\r\n```\r\n\r\nTo use auxiliary routes. We should provide a more ES5-friendly version like:\r\n\r\n```\r\n@RouteConfig([\r\n  { auxPath: '/foo', component: FooCmp }\r\n])\r\n```\r\n\r\nOr:\r\n\r\n```\r\n@RouteConfig([\r\n  { path: '/foo', auxComponent: FooCmp }\r\n])\r\n```\r\n\r\nI'm open to suggestions."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/142521216","html_url":"https://github.com/angular/angular/issues/4319#issuecomment-142521216","issue_url":"https://api.github.com/repos/angular/angular/issues/4319","id":142521216,"user":{"login":"gdi2290","id":1016365,"avatar_url":"https://avatars.githubusercontent.com/u/1016365?v=3","gravatar_id":"","url":"https://api.github.com/users/gdi2290","html_url":"https://github.com/gdi2290","followers_url":"https://api.github.com/users/gdi2290/followers","following_url":"https://api.github.com/users/gdi2290/following{/other_user}","gists_url":"https://api.github.com/users/gdi2290/gists{/gist_id}","starred_url":"https://api.github.com/users/gdi2290/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdi2290/subscriptions","organizations_url":"https://api.github.com/users/gdi2290/orgs","repos_url":"https://api.github.com/users/gdi2290/repos","events_url":"https://api.github.com/users/gdi2290/events{/privacy}","received_events_url":"https://api.github.com/users/gdi2290/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T07:45:33Z","updated_at":"2015-09-23T07:45:33Z","body":"@btford ya that's a good point. I also agree @PascalPrecht that it is inconsistent otherwise. The benefit of my proposal is that it's following a javascript convention for the most part. For example, we can look at the GeoJson spec\r\n```\r\n{\r\n  \"type\": \"Feature\",\r\n  \"geometry\": {\r\n    \"type\": \"Point\",\r\n    \"coordinates\": [125.6, 10.1]\r\n  },\r\n  \"properties\": {\r\n    \"name\": \"Dinagat Islands\"\r\n  }\r\n}\r\n```\r\nnotice how there are two types here as it's one way to serialize types. We soon realized that this convention may result in maintainability problems when communicating between two typed languages other than javascript which lead to the creation of `transit` spec https://github.com/cognitect/transit-format \r\n\r\nthese routes presumably will remain small (larger apps would end up using types)  so there won't be any maintainability problems. The `type` prop also allows for future proof since the value is dynamic and new types (if any) could be added. "}}