Is it possible to style the dynamically created component in Angular4? I have the next code:
createComponent(event) {
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(SbImageGalleryPinComponent);
let componentRef = this.pin.createComponent(componentFactory);
document.querySelector('.sb-component-gallery__container').addEventListener('mousemove', this.onMouseMove.bind(this));
}
onMouseMove(event) {
// ????
}
So I want to create component and then set the position left and top relatively to mouse. I am creating component that is sticky to the mouse. Is it possible to reproduce the logic I need?