Author Topic: Error loading grid with angular  (Read 2413 times)

ayordy67

  • Newbie
  • *
  • Posts: 1
    • View Profile
Error loading grid with angular
« on: November 29, 2016, 02:52:05 am »
Hi,
I am trying to load the grid using angularjs. I am getting this error when the page loads: angular.js:
TypeError: $ele.pqGrid is not a function

Any ideas what is causing this?

gulzah

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error loading grid with angular
« Reply #1 on: February 17, 2017, 02:24:51 am »
Hi ayordy67,

I had the same problem also, and i visited the forum also :), saw your question - had many views, no answer, and i decided digging into the source code a bit, and i found the problem. Im guessing you've already managed by now, since i'm couple of months late :), but still here it is: the name of the object bound (through jquery) to the grid element is actually "paramquery-pqGrid", and not "paramqueryPqGrid" - as it is requested by the .data() method in the 'angular/ng.pqgrid.dev.js' file on 286th line.
Just change that and it will be ok...

gulzah

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error loading grid with angular
« Reply #2 on: February 17, 2017, 02:28:06 am »
Oops, i almost forgot, you should then reference the angular 'dev.js' file and not the minnified version, or you can also find this in the minnified file and change it directly there :)