TypeError: this[("text" + "Handler")] is not a function

16 views
Skip to first unread message

Luis Humberto Balam Gonzalez

unread,
Mar 3, 2015, 12:35:42 PM3/3/15
to polym...@googlegroups.com
Hi boys,
I'm a noob.
I try Polymer

I modified the original example project, like this:

<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/core-ajax/core-ajax.html">

<polymer-element name="post-service" attributes="posts">
 
<template>
   
<style>
   
:host {
      display
: none;
   
}
   
</style>
   
<core-ajax id="ajax"
     
auto
     
url="example.json"
     
on-core-response="{{postsLoaded}}"
     
handleAs="json">
   
</core-ajax>
 
</template>
 
<script>
 
Polymer('post-service', {
    created
: function() {
     
this.posts = {};
   
},
    postsLoaded
: function() {
     
// Make a copy of the loaded data
     
this.posts = this.$.ajax.response;
   
}

 
});
 
</script>
</polymer-element>




My Json Archive:

{"record_0":{"codigo":"1901983","primerapellido":" MIRANDA","segundoapellido":"BARRERA","nombres":"BLANCA ROSA ","curp":"IGNORAR","tipo":"soundlike"},"record_1":{"codigo":"1901042","primerapellido":"AKE","segundoapellido":"PAT","nombres":"NEYBI DEL ROSARIO","curp":"IGNORAR","tipo":"soundlike"},"record_2":{"codigo":"1900805","primerapellido":"AKE","segundoapellido":"RODRIGUEZ","nombres":"ROSALINDA","curp":"AERR810508MYNDS","tipo":"soundlike"},"record_3":{"codigo":"20100096","primerapellido":"ALFONSO","segundoapellido":"CASTILLO","nombres":"ROSA MARIA","curp":"IGNORAR","tipo":"soundlike"},"record_4":{"codigo":"20100235","primerapellido":"ANALZ","segundoapellido":"NAH ","nombres":"ROSA ELENA ","curp":"AANR810317MYNLHS02","tipo":"soundlike"},"record_5":{"codigo":"1901128","primerapellido":"ARGAEZ","segundoapellido":"TUN","nombres":"ROSA DEL CARMEN","curp":"IGNORAR","tipo":"soundlike"},"record_6":{"codigo":"1901134","primerapellido":"BAESA","segundoapellido":"CEBALLO","nombres":"ROSA MINELIA","curp":"IGNORAR","tipo":"soundlike"},"record_7":{"codigo":"1300047","primerapellido":"BASTO","segundoapellido":"AKE","nombres":"ROSA BEATRIZ","curp":"","tipo":"soundlike"},"record_8":{"codigo":"1901819","primerapellido":"BASTO","segundoapellido":"CAM","nombres":"MARIA ROSARIO DEL SOCORRO","curp":"IGNORAR","tipo":"soundlike"},"record_9":{"codigo":"1600206","primerapellido":"CANCHE","segundoapellido":"PECH","nombres":"CARMINIA DEL ROSARIO","curp":"","tipo":"soundlike"}}



And the this error:

TypeError: this[("text" + "Handler")] is not a function




Any idea? any help?


Thanks,


Reply all
Reply to author
Forward
0 new messages