我正在使用nativescript-Drop-Down插件來處理我的nativescript javascript應用程序。我的問題是我無法觸發我的js文件中的selectedIndexChanged事件。Nativescript-Drop-Down在javascript中獲取值
在我view_page.xml我有以下
<Page
class="page"
navigatingTo="onNavigatingTo"
xmlns:dd="nativescript-drop-down">
<dd:DropDown id="outletnumber" items="
{{ orderNumbers }}" selectedIndex="{{ selectedIndex }}"
opened="dropDownOpened"
closed="dropDownClosed"
selectedIndexChanged="dropDownSelectedIndexChanged"
row="1" col="1" />
</Page>
在我view_page.js我有這個
exports.dropDownSelectedIndexChanged(arg){
console.log("Drop Down selected index changed from :", args);
}
我沒有看到在互聯網上的一個很好的例子,使用JavaScript和nativescript-dropdown