title: How to render html which is coming from php response
body: <p>I am using codeigniter.
  I am doing this in my front end code:-</p>
  
  <pre><code>$scope.book=function(){
   $http.get("./Booking/index")   //getting response as an html page, should render it to do correctly.
      .then(function (data) {
        console.log(data);       //prints whole html code of booking.html
   });
  }
  </code></pre>
  
  <p>And in my Booking controller I am doing:-</p>
  
  <pre><code>public function index(){
      $this-&gt;load-&gt;view('booking');
  }
  </code></pre>
  
  <p>So I am getting as response as an html page <a href="https://i.stack.imgur.com/NCSuA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NCSuA.png" alt="getting response as html page"></a></p>
  
  <p>I want to render that html as the frontend code how can I do that? In simple words i want my book function when executed, gives up booking page as frontend which i am getting as response from get request.</p>