BorisMoore / jquery-tmpl

The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
3.23k stars 1.01k forks source link

Unnecessary http request happening when applying template inside ajax success request #195

Open maityutpal opened 2 years ago

maityutpal commented 2 years ago

I am using this plugin in my project. It is working fine but when applying templating inside a ajaxcall success response it is calling an unknown http url https://xxxxxxxx.azurewebsites.net/class=%22%22 like this

My template is defined like this way

<script id="app-list-filter-template" type="text/x-jQuery-tmpl">
    <li class="nav-item mb-3 me-3 app-content app-contents {{if IsSelected == true}} selected {{/if}}" data-appid="${AppId}" data-iscloud="${IsCloud}" data-versionid="${AppVersionId}">

        <a class="nav-link d-flex flex-column app-contents overflow-hidden  w-100px h-100px py-4" data-bs-toggle="pill">

            <div class="nav-icon">
                <img alt="" src=${IconPath} class="">
            </div>
            <span class="nav-text app-name">${AppName}</span>
            <span class="nav-text text-gray-700 app-version-name ">${AppVersionNumber}</span>
            <span class="bullet-custom position-absolute bottom-0 w-100 h-4px bg-primary"></span>

        </a>
    </li>
</script>

And in success applying templating like this way

success: function (responseData) {

                    if (responseData.Status) {
                        OnBoarding.appList = responseData.Value;
                        $('#onboarding-app-list').html('');
                        $("#app-list-filter-template").tmpl(responseData.Value).appendTo("#onboarding-app-list");
                        if (OnBoarding.blockui.isBlocked()) {
                            OnBoarding.blockui.release();
                        }
                        event.preventDefault();
                        event.stopPropagation();
                        return true;
                    }

                }

When I am commenting the templating code inside ajax success that unknown http url call is not happening.