{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/4622","labels_url":"https://api.github.com/repos/angular/angular/issues/4622/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/4622/comments","events_url":"https://api.github.com/repos/angular/angular/issues/4622/events","html_url":"https://github.com/angular/angular/issues/4622","id":110579562,"number":4622,"title":"refactor(router): rename \"as\" to \"name\" in RouteConfig","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/hotlist:%20community-help","name":"hotlist: community-help","color":"d4c5f9"},{"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:%20refactor","name":"type: refactor","color":"EEEEEE"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-10-09T03:06:14Z","updated_at":"2015-10-25T04:54:32Z","closed_at":null,"body":"John Papa proposes we rename `as` to `name` in `RouteConfig` to reduce some of the confusion about its purpose:\r\n\r\nSo this:\r\n\r\n```\r\n@RouteConfig([\r\n  { path: '/foo', component: MyCmp, as: 'MyCmp' }\r\n])\r\n```\r\n\r\nWould become this:\r\n\r\n```\r\n@RouteConfig([\r\n  { path: '/foo', component: MyCmp, name: 'MyCmp' }\r\n])\r\n```\r\n\r\n/cc @johnpapa"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/150891838","html_url":"https://github.com/angular/angular/issues/4622#issuecomment-150891838","issue_url":"https://api.github.com/repos/angular/angular/issues/4622","id":150891838,"user":{"login":"vamsivarikuti","id":7098541,"avatar_url":"https://avatars.githubusercontent.com/u/7098541?v=3","gravatar_id":"","url":"https://api.github.com/users/vamsivarikuti","html_url":"https://github.com/vamsivarikuti","followers_url":"https://api.github.com/users/vamsivarikuti/followers","following_url":"https://api.github.com/users/vamsivarikuti/following{/other_user}","gists_url":"https://api.github.com/users/vamsivarikuti/gists{/gist_id}","starred_url":"https://api.github.com/users/vamsivarikuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vamsivarikuti/subscriptions","organizations_url":"https://api.github.com/users/vamsivarikuti/orgs","repos_url":"https://api.github.com/users/vamsivarikuti/repos","events_url":"https://api.github.com/users/vamsivarikuti/events{/privacy}","received_events_url":"https://api.github.com/users/vamsivarikuti/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T04:54:32Z","updated_at":"2015-10-25T04:54:32Z","body":"Hi @btford, I'm working on this. I have added `name?: string` to all classes implementing `RouteDefinition` interface. In constructors `this.name = name || as`, renamed `as` to `name` everywhere including unit tests, left one test with `as` syntax. \r\n\r\nQ. Should we throw an error (or) prefer one of the `as` and `name` if both are passed?"}}