{"action":"created","issue":{"url":"https://api.github.com/repos/blackbaud/skyux-builder/issues/393","repository_url":"https://api.github.com/repos/blackbaud/skyux-builder","labels_url":"https://api.github.com/repos/blackbaud/skyux-builder/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/blackbaud/skyux-builder/issues/393/comments","events_url":"https://api.github.com/repos/blackbaud/skyux-builder/issues/393/events","html_url":"https://github.com/blackbaud/skyux-builder/pull/393","id":311624278,"number":393,"title":"Configured dispose for hmr","user":{"login":"Blackbaud-MitchellThomas","id":9661547,"avatar_url":"https://avatars0.githubusercontent.com/u/9661547?v=4","gravatar_id":"","url":"https://api.github.com/users/Blackbaud-MitchellThomas","html_url":"https://github.com/Blackbaud-MitchellThomas","followers_url":"https://api.github.com/users/Blackbaud-MitchellThomas/followers","following_url":"https://api.github.com/users/Blackbaud-MitchellThomas/following{/other_user}","gists_url":"https://api.github.com/users/Blackbaud-MitchellThomas/gists{/gist_id}","starred_url":"https://api.github.com/users/Blackbaud-MitchellThomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blackbaud-MitchellThomas/subscriptions","organizations_url":"https://api.github.com/users/Blackbaud-MitchellThomas/orgs","repos_url":"https://api.github.com/users/Blackbaud-MitchellThomas/repos","events_url":"https://api.github.com/users/Blackbaud-MitchellThomas/events{/privacy}","received_events_url":"https://api.github.com/users/Blackbaud-MitchellThomas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-05T14:04:03Z","updated_at":"2018-04-10T14:40:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/blackbaud/skyux-builder/pulls/393","html_url":"https://github.com/blackbaud/skyux-builder/pull/393","diff_url":"https://github.com/blackbaud/skyux-builder/pull/393.diff","patch_url":"https://github.com/blackbaud/skyux-builder/pull/393.patch"},"body":"On each reload of the page with HMR enabled, a new instance of omnibar is created. This led to @Blackbaud-PaulCrowder mentioning that the AppComponent needed to implement `OnDestroy`. When I implemented OnDestroy, I discovered that it wasn't being called.\r\n\r\nThis PR ensures that the lifecycle event for destroy is called on HMR swaps."},"comment":{"url":"https://api.github.com/repos/blackbaud/skyux-builder/issues/comments/380125472","html_url":"https://github.com/blackbaud/skyux-builder/pull/393#issuecomment-380125472","issue_url":"https://api.github.com/repos/blackbaud/skyux-builder/issues/393","id":380125472,"user":{"login":"Blackbaud-BobbyEarl","id":4612419,"avatar_url":"https://avatars3.githubusercontent.com/u/4612419?v=4","gravatar_id":"","url":"https://api.github.com/users/Blackbaud-BobbyEarl","html_url":"https://github.com/Blackbaud-BobbyEarl","followers_url":"https://api.github.com/users/Blackbaud-BobbyEarl/followers","following_url":"https://api.github.com/users/Blackbaud-BobbyEarl/following{/other_user}","gists_url":"https://api.github.com/users/Blackbaud-BobbyEarl/gists{/gist_id}","starred_url":"https://api.github.com/users/Blackbaud-BobbyEarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blackbaud-BobbyEarl/subscriptions","organizations_url":"https://api.github.com/users/Blackbaud-BobbyEarl/orgs","repos_url":"https://api.github.com/users/Blackbaud-BobbyEarl/repos","events_url":"https://api.github.com/users/Blackbaud-BobbyEarl/events{/privacy}","received_events_url":"https://api.github.com/users/Blackbaud-BobbyEarl/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T14:40:57Z","updated_at":"2018-04-10T14:40:57Z","author_association":"OWNER","body":"Hey @Blackbaud-MitchellThomas thanks for the PR!  I was picturing something like the following:\r\n\r\n```\r\ndeclare var module: any;\r\n\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { NgModuleRef } from '@angular/core';\r\nimport { AppModule } from './app/app.module';\r\nimport { SkyAppBootstrapper } from '../runtime/bootstrapper';\r\n\r\nSkyAppBootstrapper\r\n  .processBootstrapConfig()\r\n  .then(() => platformBrowserDynamic().bootstrapModule(AppModule))\r\n  .then((ngModuleRef: NgModuleRef<any>) => {\r\n    if (module.hot) {\r\n      module.hot.accept();\r\n      module.hot.dispose(() => ngModuleRef.destroy());\r\n    }\r\n  });\r\n```"}}
{"actor":{"display_login":"Blackbaud-BobbyEarl"}}