KendoUI Bridge Documentation
  • Introduction
  • About this application
    • Introduction
    • Navigation guide
    • Components catalog
    • Installation
    • Catalog index
    • Themes selector
  • About Aurelia
    • Key features
  • About KendoUI
    • Integrated with Aurelia
    • Why choose KendoUI
  • Developers tutorials
    • Introduction
    • Sample application structure
    • esnext - kendo
    • esnext-aspnetcore - kendo-2017
    • esnext-aspnetcore - kendo-2015
    • typescript - kendo
    • typescript-aspnetcore - kendo
    • esnext- webpack
    • typescript-webpack kendo
  • Developers notes
    • Current limitations
    • Loading a subset of controls
    • Lazy loading wrappers
    • Running gists
    • Kendo Tooltip HTML content
    • Bundling details
    • Dynamic content creation
    • Bundling step by step instructions
    • What you need to know
    • Localization
    • Prevent JSPM from loading jQuery
  • Bridge developers notes
    • Introduction
    • Bridge utilities
    • Generation of bindables
    • Babel DTS generator
    • Grid HTML api
    • Template compilation
    • Harvesting bindable variables
    • Registry helper class
    • Creating gists for the catalog app
  • Troubleshooting
    • Introduction
    • Using gists and GistRun
Powered by GitBook
On this page
  • 5.3 Lazy loading wrappers
  • 5.3.1 Plugin configuration callback
  • 5.3.2 <require> wrappers in views
  1. Developers notes

Lazy loading wrappers

PreviousLoading a subset of controlsNextRunning gists

Last updated 7 years ago

Application Developer notes

5.3 Lazy loading wrappers

There are two ways of pulling in the wrappers that you need: via the plugin configuration callback ( equivalent) or <require> wrappers in a view.

5.3.1 Plugin configuration callback

You may have the following line in main.js:

.plugin('aurelia-kendoui-bridge', kendo => kendo.pro())

This tells the plugin to load all Kendo PRO wrappers and register them globally (using the functionality of the Aurelia framework). That way, you can use these wrappers in any view without having to pull them in. This approach is recommended if you use a subset of Kendo controls (see the "Loading subset of controls" article), and when you use wrappers in many different views.

5.3.2 <require> wrappers in views

A different approach is to <require> wrappers in views where needed. This is a more efficient way than using the plugin configuration callback as it does not increase the load time of the entire app, however, pulling in the wrappers via <require> takes more work to get right.

This is how you would <require> the grid wrapper in a view:

<require from="aurelia-kendoui-bridge/grid/grid"></require>
<require from="aurelia-kendoui-bridge/grid/col"></require>
<require from="aurelia-kendoui-bridge/common/template"></require>

Note that you need to know the location of the wrappers. These paths can be found in the file of our plugin.

globalResources
globalResources
config-builder.js