Using this as a starting point:
http://plnkr.co/edit/CncDWCktXTuBQdDVfuVv?p=preview
When one clicks on an item: selectedItems: $scope.mySelections, is filled with a item. How can the output of selectedItem be passed out of ng-model and into another js function.
I'm not sure I entirely understand your question, but if you want to run some code when the selection changes the easiest way to do that is to add a watch.
$scope.$watch('mySelections', function (value) {
// Triggered every time mySelections is changed.
});
(I apologize if I totally misunderstood your question.)
Update with example
This is a simple example using the $http service. The watch will trigger every time $scope.mySelections changes and the value parameter will reflect its value.
$scope.$watch('mySelections', function (value) {
$http.post('/path/', { selectedItems: value })
.success(function (result) {
alert('Saved!');
}).error(function (err) {
alert(err);
});
}, true);
Notice the third parameter with the value true. That one is needed for angular to notice changes in the array. (More about the third parameter here.)