single-spa / single-spa-angular

Helpers for building single-spa applications which use Angular
Apache License 2.0
203 stars 78 forks source link

Support angular 16 and standalone components #484

Closed pasblin closed 1 year ago

pasblin commented 1 year ago

Description of Proposed Feature

Add support for angular 16 and standalone components

In what way would you use it?

Enterprise aplications

wchuang000000 commented 1 year ago

I understand on old issues that there is limited support for angular, If you are able to provide some input on how to do it, I could try to do it and raise a PR

bh3605 commented 1 year ago

support for stand alone comps already exists

Example

const lifecycles = singleSpaAngular({
  bootstrapFunction: (singleSpaProps) => {
    singleSpaPropsSubject.next(singleSpaProps);
    return bootstrapApplication(AppComponent, {
      providers: [
        { provide: APP_BASE_HREF, useValue: '/' },
        getSingleSpaExtraProviders(),
        provideRouter([{ path: '**', component: EmptyRouteComponent }]),
      ],
    });
  },
  template: '<app-mfesspa />',
  Router,
  NavigationStart,
  NgZone,
});

export const bootstrap = lifecycles.bootstrap;
export const mount = lifecycles.mount;
export const unmount = lifecycles.unmount;
arturovt commented 1 year ago

Closing per the latest comment.