Comments (15)
I also saw memory issue, i don't know where it is, I unmount the angular app and the route, so I think it is not in my hand... thanks for this analyse. We have to work on it as soon as possible in my project, I will be back to you if I find something.
I have to test it with angular 6, maybe something has changed to unmount apps.
from single-spa-angular-cli.
Oh did you not have the memory leak in previous Angular versions?
I was assuming it was maybe related to this which has been open over the last couple of releases of Angular:
from single-spa-angular-cli.
Please do let me know if there's anything I can do to help - I have time to invest if it gets us able to use Single-SPA :)
from single-spa-angular-cli.
Ok thanks!
Do you want the permission to push on single spa angular cli to test something?
from single-spa-angular-cli.
I guess for now I can just clone it and build locally right? Is there anything tricky about build process?
from single-spa-angular-cli.
nope, only a npm link
from single-spa-angular-cli.
I have to admit I'm a little lost for ideas right now. I've been poking around in the Angular source and it feels like you're doing all the right things. The only other thing I can think of is calling destroy on the platform itself which according to a comment in the source code should Destroy the Angular platform and all Angular applications on the page
which sounds like it might be a possibility.
I'm not 100% sure how to do that within Single SPA lifecycle though and I guess it probably doesn't work for you (we currently have a limit to one active Angular app at a time because it seems to cause more trouble than it's worth to have them running in parallel).
from single-spa-angular-cli.
Not sure if it's relevant, but came across the following code when researching another issue (note the comment - "Ensure Angular destroys itself on hot reloads.") :
platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
// Ensure Angular destroys itself on hot reloads.
if (window['ngRef']) {
window['ngRef'].destroy();
}
window['ngRef'] = ref;
// Otherwise, log the boot error
}).catch(err => console.error(err));
At this link: [(https://stackblitz.com/edit/angular-x32any?file=src%2Fmain.ts)]
Which was referenced here: [https://stackoverflow.com/questions/43991306/angular-4-5-6-global-variables/43991457#43991457]
from single-spa-angular-cli.
Thanks for the tip.
Maybe @robinComa will have more luck with this but I've not been able to make it work (not seen any memory reduction).
Also, I suspect that for this module it won't be acceptable because that must destroy the whole of angular on the page, right? And people might be running multiple Angular apps simultaneously.
from single-spa-angular-cli.
Thanks @pevans360 !
If you want, you can try to add it on single spa anuglar cli?
Could you try to do a PR?
Bye guys
from single-spa-angular-cli.
@robinComa - Happened across this thread while researching a different angular memory issue. Haven't used this project (and just had to look up what a PR is). Was just trying to help out ... don't think this is the right spot for my 1st PR.
from single-spa-angular-cli.
@pevans360 no problem, I understand
Thank you for your comment!
from single-spa-angular-cli.
This project is deprecated (see #36). Use single-spa-angular@3, instead.
from single-spa-angular-cli.
@freon27 any solution for this, I have the same problem, please could you tell me how you solved it
from single-spa-angular-cli.
We didn't end up going with single SPA at the time due to this problem.
However my understanding is that Single SPA has changed a lot since then and I know other teams in our company have started using it, apparently without problems.
from single-spa-angular-cli.
Related Issues (20)
- Child application not bootstraped HOT 5
- Start the child application in a specified div HOT 8
- Compatibility with IE11 HOT 1
- [Tip] Font styles not working on remote app HOT 1
- angular 5 cli and angular 1.5 HOT 1
- Pass dynamic base url to Angular app HOT 4
- can't get singleSpaRouterLink to do anything HOT 1
- getAppNames undefined while loading angular cli application HOT 10
- Update to Angular 6/Webpack 4 HOT 2
- Make Load Timeout Configurable HOT 3
- Add Option to leave apps mounted HOT 12
- Error zone.js in ie11 HOT 3
- v0.4.2 doesn't support Angular 6/ Single-Spa 4.0+ HOT 1
- Not bootstraped - child application HOT 2
- Please make me a maintainer to this project HOT 2
- Expected to not be in Angular Zone, but it is! HOT 13
- Look like does not work with Angular 6+ HOT 5
- dependency of rxjs is out of dated HOT 1
- Interest in joining in on broader single-spa discussions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from single-spa-angular-cli.