diff options
Diffstat (limited to 'docs/content/api')
| -rw-r--r-- | docs/content/api/angular.inputType.ngdoc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/content/api/angular.inputType.ngdoc b/docs/content/api/angular.inputType.ngdoc index 76a907d1..bfd5fe6f 100644 --- a/docs/content/api/angular.inputType.ngdoc +++ b/docs/content/api/angular.inputType.ngdoc @@ -40,8 +40,8 @@ All `inputType` widgets support: <doc:example> <doc:source> <script> - angular.inputType('json', function() { - this.$parseView = function() { + angular.inputType('json', function(element, scope) { + scope.$parseView = function() { try { this.$modelValue = angular.fromJson(this.$viewValue); if (this.$error.JSON) { @@ -52,19 +52,19 @@ All `inputType` widgets support: } } - this.$parseModel = function() { + scope.$parseModel = function() { this.$viewValue = angular.toJson(this.$modelValue); } }); - function Ctrl() { - this.data = { + function Ctrl($scope) { + $scope.data = { framework:'angular', codenames:'supper-powers' } - this.required = false; - this.disabled = false; - this.readonly = false; + $scope.required = false; + $scope.disabled = false; + $scope.readonly = false; } </script> <div ng:controller="Ctrl"> |
