how to set value in text field in angularjs on row click

I am trying to set value on text field when row is click but I got the value of row text but I am not able to set value on text field .

here is concept

<li ng-click="rowclick(station)" class="item" ng-repeat="station in data.data | filter:stationCode :startsWith">{{station.stationName+"-("+station.stationCode+")"}}</li>

I right ng-click="rowclick(station)" event when any row is click .But I need to set value whatever is selected ..so first type "b" character in text field here is my code http://codepen.io/anon/pen/KpKyZW

 $scope.rowclick=function(station){
     $scope.stationCode=station.stationCode;
          //  $scope.$apply();
   }

Thannks

Instead of giving stationCode, give SEARCH.stationCode for the model. The problem is with the scoping. The stationCode that you are setting in rowclick function is not in the same scope as the one that you are expecting

See this modified code: http://codepen.io/anon/pen/zGYPWj

$scope.SEARCH.stationCode is the change that I made. I also initialised $scope.SEARCH = {};