$scope.selectedId = null; $scope.viewMore = function(id){ $scope.showDiv = true; $scope.selectedId = id; }