Using Angular directives in external template view

2 posts, 0 answers
  1. Julia
    Julia avatar
    11 posts
    Member since:
    Jun 2016

    Posted 05 Jul Link to this post

    Background: I'm using external templates as described here for different pages in my SPA. Those pages consist of script tags with type "text/x-kendo/template". I load those templates into my index.html file and create Kendo views for each of the pages.

     

    For some reason, I am not able to use the Kendo angular directives (e.g., "<input kendo-date-time-picker/>") inside my template scripts - they don't load properly. Using the same directives in my index.html file works perfectly though, so there shouldn't be a problem with dependencies. I suspect that the problem is either that there's some incompatibility with having the angular directives inside a View or that I'm not calling the right functions on the View. Right now, I'm just doing "layoutName.showIn("#content", viewName);" for the latter.

     

    If anyone knows a fix, that would be super helpful. Otherwise, pointing me to an example of an SPA using external templates and the Kendo Angular directives would be helpful as well.

     

  2. Julia
    Julia avatar
    11 posts
    Member since:
    Jun 2016

    Posted 06 Jul in reply to Julia Link to this post

    The problem was that Kendo MVVM, Router, Layout, and View aren't compatible with Angular, as mentioned here: https://dzone.com/articles/angularjs-and-kendoui-your. I changed my Kendo Routers and Views to Angular routeProviders and ng-view, and was able to use Kendo Angular directives inside my pages without a problem.
  3. Kendo UI is VS 2017 Ready
Back to Top