This is a migrated thread and some comments may be shown as answers.

ABP.io framework

3 Answers 957 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Edwin
Top achievements
Rank 1
Edwin asked on 24 Apr 2020, 12:46 PM

Is there a user who has succesfully used UI for ASP.Net Core in ABP.io commercial?

ABP.io loads all scripts at the bottom of the page but kendo requires it's scripts to be loaded near/at the top of the page.

We do not have access to the supplied theme pages, so we are unable to move the scripts ourselves.

I am already engaging with ABP.io support to resolve this, but i am curious if someone else already has been able to work around these limits.

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Edwin
Top achievements
Rank 1
answered on 28 Apr 2020, 11:10 AM
We have had two respones to our support request and both solutions work like a charm.

Solution 1:
* Remove jquery from the global script bundle with a script contributor

public class CustomGlobalScriptContributor: BundleContributor
{
    public override void ConfigureBundle(BundleConfigurationContext context)
    {
        context.Files.RemoveAll(x => x.Contains("jquery"));
    }
}

And add the following to your ABP module

context.Services.Configure<AbpBundlingOptions>(options =>
{
    options
        .ScriptBundles
        .Configure(StandardBundles.Scripts.Global, bundle => {
            bundle.AddContributors(typeof(CustomGlobalScriptContributor));
        });
});

* Add a layout hook to reinclude jquery and the kendo scripts at the top of the page or header. The process is described here for using google analytics on every page.

Solution 2:
* Add a layout hook to include the kendo scripts and DeferredScripts function to the bottom of the page
* Add .Deferred() to all used controls
* Example code from a lead developer @ volosoft can be found here: https://github.com/abpframework/abp/commit/ec3ff48ef0e47432bccc1e11f87b0d026cf2f8be

The complete thread with the original solutions can be found here.
https://support.abp.io/QA/Questions/124/Telerik-UI-for-ASP.Net-Core
0
Josiah
Top achievements
Rank 1
Veteran
answered on 17 Nov 2020, 07:10 PM
This did work for me previously with a standard theme. However now that I'm using the commercial theme, I am unable to get this working properly. I end up with two versions of jquery.js which I believe is causing some errors. Anybody have any input on this? Thank you!
0
Aleksandar
Telerik team
answered on 20 Nov 2020, 01:26 PM

Hello Josiah,

Indeed loading jQuery twice will cause undesired results. If I understand correctly the issue is coming from two jQuery files loaded by the framework, so I can suggest reaching out to the ABP.io support for further details on how to prevent the loading of multiple jQuery script files.

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Edwin
Top achievements
Rank 1
Answers by
Edwin
Top achievements
Rank 1
Josiah
Top achievements
Rank 1
Veteran
Aleksandar
Telerik team
Share this question
or