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

Unable to switch between multiple angular apps #12

Open
sri1980 opened this issue Sep 1, 2018 · 4 comments
Open

Unable to switch between multiple angular apps #12

sri1980 opened this issue Sep 1, 2018 · 4 comments

Comments

@sri1980
Copy link

sri1980 commented Sep 1, 2018

i am trying to load multiple angular apps (1.x, 4, 6 versions) using single-spa framework.

registerApplication('app1', () => loadApp('index.html path') , pathPrefix('/app1'));
registerApplication('app2', () => loadApp('index.html path') , pathPrefix('/app2'));

function loadApp(url) {
return new Promise((resolve, reject) => {

  //load all polyfills, vendor, main js files

   var script = document.createElement("script");
   script.type = "text/javascript";
   script.src = "polyfills-bundl.js";  
   document.head.appendChild(script);

});
}

app1 loads successfully, if i try to load 'app2' it doesn't work. it is the same way for app2.

Can you please help me what is the issue here?

Does single-spa-webpack-example supports to load different angular version apps?

@joeldenning
Copy link
Owner

What error are you seeing when app2 doesn't work?

see single-spa/single-spa-angular#4 for more info on loading multiple angular versions in the same page

@sri1980
Copy link
Author

sri1980 commented Sep 2, 2018

Thanks for your response. I am not seeing any error. Url is getting changed with route appending to base url, but nothing happens in the browser.
Please let me know is there any additional details I can provide to help me on this.

Thanks again

@joeldenning
Copy link
Owner

Are you using the code in simple-single-spa-webpack-example, that uses https://github.com/CanopyTax/single-spa-angular? Or are you using https://github.com/PlaceMe-SAS/single-spa-angular-cli?

@sri1980
Copy link
Author

sri1980 commented Sep 2, 2018

I am using simple-single-spa-webpack-example

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

2 participants