Use $scope.model instead of $scope.data