Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling app instance's "destroy" is broken when using this addon #158

Open
roberkules opened this issue May 3, 2021 · 0 comments
Open

Comments

@roberkules
Copy link

Hi,

we're trying to use single-spa with angular and ember side by side, according to the route, either ember or angular is active. when ember is unmounted, single-spa calls opts.applicationInstance.destroy();

this works until ember-destroyable-polyfill is added. then the app instance continues to exist even after destroy() is called on it.

I tested the behavior in an empty ember app (without the single-spa-ember or any other addon). without ember-destroyable-polyfill upon calling destroy() on the app, all DOM nodes are removed and the app instance (in our case EmberLeak) is undefined. but adding this addon causes the EmberLeak instance to continue to exist, and no content is removed from the DOM.

this actually results in a weird state when using in single-spa when switching back and forth between angular and ember. each time there's another app instance added and all ajax requests get multiplied. (also causes other issues)

{
  "devDependencies": {
    "@ember/jquery": "^0.5.2",
    "@ember/optional-features": "^0.6.3",
    "ember-destroyable-polyfill": "^2.0.2",
    "broccoli-asset-rev": "^2.7.0",
    "ember-auto-import": "^1.11.3",
    "ember-cli": "~3.17.0",
    "ember-cli-app-version": "^3.2.0",
    "ember-cli-babel": "^7.22.1",
    "ember-cli-dependency-checker": "^3.1.0",
    "ember-cli-eslint": "^4.2.3",
    "ember-cli-htmlbars": "^3.0.0",
    "ember-cli-htmlbars-inline-precompile": "^1.0.3",
    "ember-cli-inject-live-reload": "^1.8.2",
    "ember-cli-sri": "^2.1.1",
    "ember-cli-template-lint": "^1.0.0-beta.1",
    "ember-cli-uglify": "^2.1.0",
    "ember-export-application-global": "^2.0.0",
    "ember-fetch": "^8.0.4",
    "ember-load-initializers": "^1.1.0",
    "ember-maybe-import-regenerator": "^0.1.6",
    "ember-qunit": "^3.4.1",
    "ember-resolver": "^5.0.1",
    "ember-source": "~3.17.0",
    "eslint-plugin-ember": "^5.2.0",
    "loader.js": "^4.7.0",
    "qunit-dom": "^0.8.0"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant