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

Kendo.template & Angular

2 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matheus
Top achievements
Rank 1
Matheus asked on 01 Feb 2016, 01:51 PM

Hi,

I created a Grid with a custom popup to edit my record I used the code below:

editable: {mode: 'popup',     template: kendo.template($("#myEdit").html())},

This works fine, but I also wanted to implement an area where I could display the errors that came from the server, so my popup was something like this

<script id="edit_admLicenca" type="text/x-kendo-template" ng-controller='mainController'>
      <div class="col-md-5 col-md-offset-3">
          <h3> Licença</h3>
           
          <div class="alert alert-danger">       
            {{errorHomeMsg}}
          </div>
           
          <div class="form-group">
            <label for="nomCliente">Nome:</label>
            <input type="text" class="form-control" name="nomCliente"/>
             
            <label for="datExpiracao">Nome:</label>
            <input type="date" class="form-control" name="datExpiracao"/>
        </div>
    </div>
</script>

But when I try to run it, it doesn't work, it displays the {{errorHomeMsg}} even though my update works correctly.Any thoughts?

 

Att

Matheus Mokwa

2 Answers, 1 is accepted

Sort by
0
Matheus
Top achievements
Rank 1
answered on 01 Feb 2016, 04:42 PM

I'm using $routeProvider, don't know if it's a problem, because I found an example that is working, but isn't using $routeProvider.

Here's the link: http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/AngularJS/use-angularjs-popup-edit-template

 

Edit:

In the first postin the editable option the name of my template is wrong, it is "edit_admLicenca" actually, same as my script.

0
Nikolay Rusev
Telerik team
answered on 04 Feb 2016, 07:46 AM

Hello Matheus,

 

The provided information is not sufficient to determine what might cause the described behavior. Could you provide us with a runnable example or a dojo perhaps? You could modify the how-to article linked in the previous post to illustrate the scenario.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Matheus
Top achievements
Rank 1
Answers by
Matheus
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or