{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/6331","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/6331/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/6331/comments","events_url":"https://api.github.com/repos/angular/angular/issues/6331/events","html_url":"https://github.com/angular/angular/issues/6331","id":125488162,"number":6331,"title":"angular route does not load AsyncRoute when i use location.go()","user":{"login":"mkrishna4u","id":16600129,"avatar_url":"https://avatars.githubusercontent.com/u/16600129?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrishna4u","html_url":"https://github.com/mkrishna4u","followers_url":"https://api.github.com/users/mkrishna4u/followers","following_url":"https://api.github.com/users/mkrishna4u/following{/other_user}","gists_url":"https://api.github.com/users/mkrishna4u/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrishna4u/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrishna4u/subscriptions","organizations_url":"https://api.github.com/users/mkrishna4u/orgs","repos_url":"https://api.github.com/users/mkrishna4u/repos","events_url":"https://api.github.com/users/mkrishna4u/events{/privacy}","received_events_url":"https://api.github.com/users/mkrishna4u/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-01-07T21:28:39Z","updated_at":"2016-09-26T18:51:08Z","closed_at":"2016-09-26T18:51:08Z","body":"angular route does not load AsyncRoute for securitymgmt when i use location.go(\"/admin/securitymgmt\") or direct url on web browser like \r\nhttp://host/myapp/#/admin/securitymgmt\r\n\r\nBut when i click on admin link (bind with routerLink) then it loads the AsyncRoute.\r\nAs per my understanding it should load the right page even if i specify the full path in \r\nweb browser as mentioned above.\r\n\r\nMy code snippet is given below for your reference.\r\n\r\nScenario is: \r\n----------------------- Main component with routing ----------\r\n@Component({\r\n  selector: 'main-dashboard',\r\n  templateUrl: 'app/main-dashboard.html',\r\n  directives: [MainNavbar, ROUTER_DIRECTIVES]\r\n})\r\n@RouteConfig([ \r\n  new AsyncRoute({\r\n    path: '/admin',\r\n    loader: () => System.import('app/admin/admin').then(m => m.Admin),\r\n    name: 'Admin'\r\n  })\r\n])\r\nexport class MainDashboard {\r\n  constructor(router: Router, location: Location) {\t\r\n  }  \r\n}\r\n-------------------- Child component of MainDashboard  with routing -----------\r\n@Component({\r\n  selector: 'soii-admin',\r\n  templateUrl: 'app/admin/admin.html',\r\n  directives: [ROUTER_DIRECTIVES]\r\n})\r\n@RouteConfig([ \r\n  new AsyncRoute({\r\n    path: '/securitymgmt',\r\n    loader: () => System.import('app/admin/security-mgmt/security-mgmt').then(m => m.SecurityMgmt),\r\n    name: 'SecurityMgmt',\r\n\tuseAsDefault: true\r\n  }),\r\n  new AsyncRoute({\r\n    path: '/systemconfig',\r\n    loader: () => System.import('app/admin/system-config/system-config').then(m => m.SystemConfig),\r\n    name: 'SystemConfig'\r\n  })\r\n])\r\nexport class Admin {\t\r\n}\r\n-------------------- Child component of Admin --------\r\n@Component({\r\n  selector: 'admin-security-mgmt',\r\n  templateUrl: 'app/admin/security-mgmt/security-mgmt.html',\r\n  directives: []\r\n})\r\nexport class SecurityMgmt {\r\n\r\n}\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/249661825","html_url":"https://github.com/angular/angular/issues/6331#issuecomment-249661825","issue_url":"https://api.github.com/repos/angular/angular/issues/6331","id":249661825,"user":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T18:51:08Z","updated_at":"2016-09-26T18:51:08Z","body":"obsolete - old router"}}
{"actor":{"display_login":"vicb"}}