ng-click doesn't work on different page

i have two file.html : list.html and popover.html.

i want to add class element when i clicked, so this way it's work to me on same file list.html :

<i ng-class="{'icon ion-ios7-pricetags select':liked, 'icon ion-ios7-pricetags':!liked}" ng-click="liked=!liked"></i>

but if i add ng-click="liked=!liked" to different file (popover.html), it's doesn't work.

<input type="radio" name="tags" value="Food" ng-click="closeInController(); liked=!liked" ng-model="data.expense">

this my code app.js for popover :

$scope.closeInController = function() {
   $scope.popover.hide();
};

anyone can help me? Thanks in advance.

It's probably because your popover and list do not share the same scope. You'll need to make sure that your liked variable is set on a shared controller scope.