Two-way bind does not work if the model is something like ng-model="record.name" for Kendo UI controls

0

I have a problem with Kendo UI controls

My HTML

 <input type="text" ng-model="record.name" kendo-numeric-text-box />
 <input type="text" ng-model="record.name"> </input>
 <button ng-click="resetRecord()" >test bind</button>

my test.js

$scope.record ={};
$scope.resetRecord= function(){
        $scope.record = {};
    }

When I run the resetRecord function only the default input clears its contents, the Kendo UI input does not clean, I tried $scope.record =null but it does not work either.

If I change the code below, it works, but I need it to work as above.

$scope.resetRecord= function(){
        $scope.record. name = null;
    }

This happens with all Kendo UI input, not only with kendo-numeric-text-box

If there is a way to interact with the object record , finding all its properties, such as name would work for me.

My intention is to only have one controller for all the crud screens of the system, I would not like to write a controller and the model definition for each system entity.

Is it a bug?

    
asked by anonymous 17.08.2014 / 16:07

1 answer

1

The only solution is to add the attribute k-rebind

<input type="text" ng-model="record.name" k-rebind="record.name" kendo-numeric-text-box /> 
    
17.08.2014 / 18:53