In my form:
<div ng-controller="myCtrl" ng-init="init('<%=JSON.stringify(data)%>')">
<input type="text" ng-model="Reg.email" />
</div>
In my angular controller
myApp.controller("myCtrl", ['$scope', '$http', '$parse', function($scope, $http, $parse) {
$scope.init = function(myJsonData){
if(myJsonData!=null)
{
var myData = angular.fromJson(myJsonData);
$scope.Reg.email = "test@example.com";
}
};
}]);
The above code will not initialize the values to the input field. But if i change model name by removing the Reg. the code will work fine.
ie. $scope.email is working and $scope.Reg.email not working in my case.
Please support !