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

Using Angular directives in external template view

1 Answer 145 Views
View
This is a migrated thread and some comments may be shown as answers.
Julia
Top achievements
Rank 1
Julia asked on 05 Jul 2016, 11:46 PM

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.

 

1 Answer, 1 is accepted

Sort by
0
Julia
Top achievements
Rank 1
answered on 06 Jul 2016, 05:11 PM
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.
Tags
View
Asked by
Julia
Top achievements
Rank 1
Answers by
Julia
Top achievements
Rank 1
Share this question
or