Created
December 11, 2018 12:07
-
-
Save Mulperi/baec271fb414b39662b61164dd02edfc to your computer and use it in GitHub Desktop.
Handling dynamic component stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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