This is a migrated thread and some comments may be shown as answers.

Multiselect AngularJS on change event

1 Answer 570 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Bertha
Top achievements
Rank 1
Bertha asked on 09 May 2016, 08:02 PM

How do I add on change event to Multiselect and calling AngularJS function?  Thanks.

$scope.typeOptions = {
placeholder: "All Types",
dataTextField: "Name",
dataValueField: "ID",
valuePrimitive: true,
autoBind: false,
dataSource: {
transport: {
read: {
url: "api/facilitytype",
}
}
}
};

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 11 May 2016, 10:05 AM
Hello Bertha,

You can set the change option to a callback and call a $scope function from it:
$scope.typeOptions = {
change: function() {
  $scope.$apply(function() {
     //call $scope function or update a field
  });
},
placeholder: "All Types",
dataTextField: "Name",
dataValueField: "ID",
valuePrimitive: true,
autoBind: false,
dataSource: {
transport: {
read: {
url: "api/facilitytype",
}
}
}
};

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MultiSelect
Asked by
Bertha
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or