how to post data into iframe using angularjs
<p>So i've never use a POST method to get an image preview into iframe. The problem that i am running into is that when i check the network tab, i get the correct responses however i dont get the actual image that i requested. </p>

<p>my controller:</p>

<pre><code>$scope.Url = $http.post("/services/v3/documents",                    // 1. url
          {
                "fileTitleText" : "will be the title text of the PDF",
                "widthMeasure" : 612,
                "heightMeasure" : 792,
                "docBag" :
                    [
                        {
                            "bookmarkTitleText" : "doc 1",
                            "applicationNumberText" : "14352947",
                      "previewFile" : "true"
                        }
                    ]
            }                                             // 2. request body
                                                         // 3. config object
      );
</code></pre>

<p>html:</p>

<pre><code>&lt;iframe frameBorder="0" class="modal-iframe" src="{{Url}}" &gt;&lt;/iframe&gt;
</code></pre>

<p>When the browser renders the page...it just loads the base url. If anyone can help me get the post call working that would be great!</p>

<p>Thanks</p>

<p>EDIT:</p>

<p>got some advice i got below to put $scope.url inside a then...here is what i got which did not solve my problem...maybe its the way i wrote it</p>

<pre><code>$http.post('/services/v3/documents', 
          {
                    "fileTitleText" : "will be the title text of the PDF",
                    "widthMeasure" : 612,
                    "heightMeasure" : 792,
                    "docBag" :
                        [
                            {
                                "bookmarkTitleText" : "doc 1",
                                "applicationNumberText" : "14352947",
                          "previewFile" : "true"
                            }
                        ]
                }           
        )
        .then($scope.Url);
</code></pre>