I have this var room_price and I need to use that variable in jQuery. Is there any way to do that.
$http({
method:'GET',
url: ''
}).then(function(response){
var roomdata = response.data;
$scope.roomdata = roomdata;
var roomtype = roomdata.data;
angular.forEach(roomtype, function(value, key){
var id = value.room_type_id;
var room_image_id = value.image;
var room_price = value.rack_price;
$scope.room_image_id = room_image_id;
$scope.id = id;
});
jQuery code
$(function() {
var p;
});
I need to set the value in p.