I have two combos on a page one uses the loader: $.ig.loader('igCombo', function() {$('#MainMenuSearchCombo').igCombo the other does not $(function () {$('#BasicCriteriaReceiptIdType').igCombo(
Do you know what triggers using the loader vs not? Only 1 combo uses the loader and the rest don't and I can't figure out why that one is. I need it not to so any direction to point me in would be helpful.
I figured out why this is happening. Is there a way to tell it to ignore the loader?
Let me rephrase the question. When its using the igLoader its not seeing our custom template engine that we configured like this:
$.ig.tmpl = function (tmpl, data) {
var template = Handlebars.compile(tmpl);
return template(data);
};
Do you have to do something different with the template engine when the loader is used?
Hi,
Here is how you can tell the igLoader to load the Infragistics Templating engine resources:
<script type="text/javascript"> $.ig.loader({ scriptPath: "Scripts/ig/", resources: "igTemplating" });<script>
You can find more information about how to use the templating engine in the Infragistics Templating engine topic.
Yeah I tried that. We're overriding the template engine to use Handlebars and I need it to recognize that. For our other MVC combos that do not use the loader it works fine but for this one with the loader it's not seeing handlebars. Any ideas? I'm stumped.
Could you explain where do you configure this custom template engine ? Is it in the Infragistics.lob.js file ? The lob.js is a bundled file, that contains the LOB components from the IgniteUI toolset. In comparison, when using the igLoader, it loads one by one each required file and lob.js is not used. I am just assuming what you may have done and give an idea.
Please provide more information on the issue, so that we can address it further.
I got it to work. Thanks for your help!
Also I tried this but still a no go...
$.ig.loader(function () {
configureIGTemplateEngine();
console.log('igGrid resources are loaded');
});
Yeah I already tried that. I will see if I can reproduce it today our application is pretty complex. Do you guys have a recommendation for using the two together?
The igLoader loads the required IgniteUI resources. As you understand it will NOT load any other file. If you are referencing the file with the custom implementation explicitly, it seems like the igLoader loads the template engine later, thus overriding the $.ig.tmpl namespace with the original content. Considering this, try to load the custom implementation after the igLoader finishes its job and see if this makes any difference.
In any case, please provide a sample reproducing the issue, if any further assistance is needed.
No it's in one of our own files. What is the recommendation for using the custom template with the loader. Where should we put the code to override it.