버튼을 클릭하여 구성 요소 팩터 리를 통해 다중 드롭 다운을 추가하고 있습니다. 새 드롭 다운을 추가 할 때마다 문제가되는 것은 이전 드롭 다운의 맨 위에 표시됩니다. 아래에서 필요하기 때문입니다. 동일한 유형의 다른 구성 요소와 관련하여 새 구성 요소의 위치를 설정하는 방법이 있습니까?동적으로 생성 된 구성 요소의 각도 2 위치
@ViewChild('additionalDropdown', { read: ViewContainerRef })
private additionalDropdown: any;
...
let componentFactory = this.resolver.resolveComponentFactory(MultiselectComponent);
let componentRef = this.additionalDropdown.createComponent(componentFactory, 0, this.additionalDropdown.injector)
틀 :
<ng-container #additionalDropdown></ng-container>
이 질문이 'css'가 아닌가? 당신은 그들을 위치 시키려고 무엇을 했습니까? – lexith