如何在priming multiselect中获取选定的值?

时间:2018-06-25 18:50:55

标签: angular primeng angular-reactive-forms

如何在预选多重选择(p-multiselect)中获取选定的选项标签和值。我正在使用反应形式。

1 个答案:

答案 0 :(得分:0)

以html

<head>
  <!-- Plotly.js -->
   <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<!-- Plotly chart will be drawn inside this DIV -->
<div id="myDiv" style="width: 100%; height: 500px;"></div>
  <script>
  /* JAVASCRIPT CODE GOES HERE */
  </script>
</body>

在组件中

您可以像这样获得价值

<p-multiSelect [options]="cities" formControlName="selectedCities"></p-multiSelect>
相关问题