Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

SPA template - placement of third party javascript libraries #1304


User avatar
0
odn created

Hi, I need to place a couple of third party javascript libraries (depending on jquery / angularjs) into the SPA template. Which would be the recommended place to put them? Some of them are only needed in a limited amount of subpages, but putting them in the view directly seems to interfere with other components, not sure. So my questions are:

  1. where to put libraries like kendoUI and in which order?
  2. where to put libraries that only have to be used in a few subpages?

Thanks for any help.

Regards

odn


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Put them in libs folder as others. Since your app is single page, you can try lazy load them when you enter to the related page. There are some libraries in angular for that. $ocLazyLoad is configured in your application for example.

    But.. even you lazy-load it, it will not be unloaded when you exit from page, by the nature of SPAs. So, if you think they will interfere with other components, they will do in anyway. But try it.

    Have a nice day.