Angular js pass value from select menu to controller using ng-change

I wanted to pass everytime i select an item from a ui-select to the controller I did try to use ng-update and ng change but it does not seem to work. Any idea? why code is below. Thank you. I just want to trigger a function once i select an item from the ui select.


 $scope.update = function () {


<ui-select ng-change="update()" multiple="multiple" tagging="tagging" tagging-label="(custom 'new' label)" ng-model="main.record.skills" theme="bootstrap" sortable="true" style="width: 300px;" title="">
  <ui-select-match class="ui-select-match" placeholder="Select skills">{$ $ $}{$ $ | limitTo:70 $} {$ $ > 70 ? "..." : "" $}</ui-select-match >
  <ui-select-choices ng-change="main.update()" refresh="main.read_skills($" repeat="skill in main.skills | filter:$ track by $index">
    <div ng-bind-html=" | highlight: $"></div>
    {$ name $}

Source: AngularJS