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

Array template using ngRepeat

6 Answers 197 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 1
Jakub asked on 08 Jun 2016, 09:57 AM

Hello,

 

How I can make this example to work?

http://dojo.telerik.com/omuWa/2

6 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 10 Jun 2016, 06:52 AM

Hello Jakub,

You should move the template outside the ng-app, otherwise the template will be already compiled when set to the Grid.

Updated example - http://dojo.telerik.com/@rusev/UFARA

Regards,
Nikolay Rusev
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Jakub
Top achievements
Rank 1
answered on 10 Jun 2016, 11:30 AM
Unfortunately I cant have template div outside application. Instead of having div element I can have script element. Is this a good solution?
0
Jakub
Top achievements
Rank 1
answered on 10 Jun 2016, 01:47 PM

I tried mixing my and yours solution and I guess I found a bug:

http://dojo.telerik.com/IFUDu/2

I used angular 1.4.8 instead of 1.4.6. As you can see I get some trash data in empty arrays.
Using Angular 1.4.6 everything works fine.

Can you fix this bug?

0
Nikolay Rusev
Telerik team
answered on 14 Jun 2016, 08:20 AM

Hello Jakub,

 

I assume that this fix here is causing the observed behavior as array items are wrapped in kendo.data.ObservableArray.

 

As a workaround you can call toJSON method in order to receive plain JavaScript array.

 

http://dojo.telerik.com/@rusev/UfExI

 

Regards,
Nikolay Rusev
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Jakub
Top achievements
Rank 1
answered on 14 Jun 2016, 08:30 AM
Thanks for the workaround, but are you going to fix it in next releases?
0
Nikolay Rusev
Telerik team
answered on 16 Jun 2016, 06:57 AM

Hello Jakub,

I don't see how we can fix this as it is in the AngularJS code base. Do you have any suggestions?

Regards,
Nikolay Rusev
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Jakub
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Jakub
Top achievements
Rank 1
Share this question
or