Skip to content

Instantly share code, notes, and snippets.

@Mulperi
Created December 11, 2018 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mulperi/baec271fb414b39662b61164dd02edfc to your computer and use it in GitHub Desktop.
Save Mulperi/baec271fb414b39662b61164dd02edfc to your computer and use it in GitHub Desktop.
Handling dynamic component stream
this.dynamicComponentService
.getLatestComponentStream()
.subscribe((component: any) => {
if (component) {
this.componentStack.push(component);
this.createComponent();
} else {
this.dynamicComponentsContainerRef.remove(
this.componentStack.length - 1
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment