0
我試圖在Angular應用程序中本地化一個選擇輸入(Angular Selectize)框。當我在selectize的配置中添加option_create
時,新創建的本地化格式顯示正常,但無法添加新項目。在Angular Selectize中使用render.option_create可以防止添加新項目
所以,用此配置的selectize輸入不添加項目:
$scope.myConfig = {
create: true,
render: {
option_create: function (data, escape) {
return '<div>MY_ADD' + ': <strong>' + escape(data.input) + '</strong></div>';
}
}
}
但這個工程:
config = {
create: true
}
See the plunker demonstrating this。
我錯過了什麼?