Uncaught TypeError: Cannot set property 'extendext' of undefined
Hi,
I was stuck up with this issue from last 2 days and not sure how to resolve this issue.
I had implemented the query builder for angular2 application by following the below reference link. https://embed.plnkr.co/13rGVC/. But it was shown below error in console window.

Even though it was working properly and able to generate JSON expression by calling getRules., But unable to generate SQL expression by calling 'getSQL' . I thought this is because of the above issue and started searching online but could not get much information.
Below are the more information related to this issue. [1]. Executing the below method from my component file getSQLStatement() { var result = $('#builder').queryBuilder('getSQL'); console.debug(result) if (!jQuery.isEmptyObject(result)) { alert(JSON.stringify(result, null, 2)); } return result; }
[2]. From there, referencing the querybuilder.min.js. Attached is the file
Note - I have tried to use query builder standalone version instead of querybuilder.min.js but no luck.
Please let me know if I missed anything or need more information.
As the documentation says you either need to include "doT.js" and "jQuery.extendext.js" or use the standalone version.
The error you mention is not present in your plunkr.
And I have not problem making "getSQL" or "getESBool" methods working either.
So what exactly is your problem ?
Thank you for your response.
I also imported both dot and jQuery.extendext and imported in my type script file in the below way. But still showing the same issue.
import doT from 'dot/doT'; import jQueryExtendext from 'jquery-extendext';
The plunkr link is working with the standalone version. But for me, it is throwing issues.
Is there any way to come up from this issue? Please let me know.
FYI,, After calling the getSQL, getting the below error in type script

Hi,
I am still having the query builder issue. Please check the error in below.

I am getting this issue while calling 'getSQL' or 'getMongo'. It is working for 'getRules'
Could you please please please let me know the issue cause and take me to forward..
Hi @mistic100
Have tried all ways to get query builder to work but have been unable to (after 2 tough days) any help would be appreciated
Getting query-builder.standalone.min.js:7 Uncaught TypeError: Cannot set property 'extendext' of undefined
Shouldn't get this if using standalone version of query builder
My index.html is below:
Thanks in advance and regards Toby
Hi @tobysmith61 I faced the same issue and I resolved by including 'query-builder.standalone.js' file instead of 'query-builder.js' .Hope it may help others