0
<iron-ajax
      auto
      url= 'http://localhost/sh_new/index.php/mobile/notes/{{misi}}'
      handle-as="document"
      on-response="handleResponse"
      last-response = "{{noteResponse}}">
</iron-ajax>
    {{noteResponse}}

result is [object HTMLDocument] how to change into html

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • I guess you need some kine of helper element like shown in http://stackoverflow.com/questions/22199662/how-to-inject-html-into-a-template-with-polymer – Günter Zöchbauer Apr 14 '16 at 09:27

1 Answers1

0

Change handle-as="document" to handle-as="html"

Use underscore.js utility named _.template to convert it into HTML. It is basically used to load partial HTML content. I know this is not good one solution but it will solve your purpose.

app.handleResponse = function(e, detail){
  var html = _.template(detail.response);
}

<iron-ajax
      auto
      url= 'http://localhost/sh_new/index.php/mobile/notes/{{misi}}'
      handle-as="html"
      on-response="handleResponse"
      last-response = "{{noteResponse}}">
</iron-ajax>
    {{noteResponse}}
Arun Shinde
  • 1,185
  • 6
  • 12