I have to pass AngularJs object to another Controller when button click event on view.
CHTML
<div ng-repeat="hotel in respData.hotels">
<button type="button" class="btn" data-ng-click="setTab(hotel.code)">Check Availability
</button></div>
Script
$scope.setTab = function (hotelcode) {
var url = 'Hotel';
url += '?HotelCode=' + hotelcode '
window.location.href = url;}
Now i'm passing one value only. I want to pass hotel object as a parameter. Is their way to do that?