将kendo-colorpicker的kendo弹出窗口附加到“组件”

问题描述 投票:0回答:1
   <kendo-colorpicker
            [view]="view"
            [format]="format"
            [paletteSettings]="settings"
            [(value)]="color"
            [popupSettings]="{ appendTo: 'component'}"
        >
        </kendo-colorpicker>

错误 - 遇到此问题错误:container.createComponent 不是函数

https://stackblitz.com/edit/angular-khdydo-yqbeep?file=app%2Fapp.component.ts

angular kendo-ui
1个回答
0
投票

由于您已经位于根组件

AppComponent
,因此只需删除
[popupSettings]="{ appendTo: 'component'}"
,颜色选择器就可以正常工作!

<kendo-colorpicker
        [view]="view"
        [format]="format"
        [paletteSettings]="settings"
        [(value)]="color"
    >
    </kendo-colorpicker>

Stackblitz 演示

© www.soinside.com 2019 - 2024. All rights reserved.