我正在尝试在我的formArray中进行一个简单的多选,但是选择不会打开选项。
HTML:
<div class="question" *ngFor="let question of questions">
<ss-multiselect-dropdown *ngIf="question.type=='checkbox'" [options]="question.options" [(ngModel)]="question.answer" (ngModelChange)="onChange($event)"></ss-multiselect-dropdown>
</div>
问题选项如下:
[{
id: 1,
name: 'option1'
}]
当我点击选择时,控制台中显示的唯一警告是:
[Violation] Added non-passive event listener to a scroll-blocking <some> event.
Consider marking event handler as 'passive'
to make the page more responsive. See <URL>
我安装了所有内容,根据此文档,我的模块正常: https://github.com/softsimon/angular-2-dropdown-multiselect
我的环境:
Angular CLI: 1.7.3
Node: 8.11.1
OS: darwin x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cdk: 5.2.4
@angular/cli: 1.7.3
@angular/material: 5.2.4
@angular-devkit/build-optimizer: 0.4.9
@angular-devkit/core: 0.4.9
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0