{"size": 1470, "ext": "js", "max_stars_repo_path": "www/js/app/spellcheck/spellcheck-controller.js", "max_stars_repo_name": "vikashvverma/VocabCloudHack", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "www/js/app/spellcheck/spellcheck-controller.js", "max_issues_repo_name": "vikashvverma/VocabCloudHack", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "www/js/app/spellcheck/spellcheck-controller.js", "max_forks_repo_name": "vikashvverma/VocabCloudHack", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.0, "max_line_length": 163, "alphanum_fraction": 0.5204081633}
angular.module('vocabBuilder.controllers')

    .controller('SpellCheckController', function ($scope, $stateParams, $log, $timeout, $ionicHistory, HelperService, DictionaryService, store, ionicMaterialInk) {
        $scope.isEditing = true;
        $scope.text = "";
        $scope.check = function (text) {
            $scope.isEditing = false;
            //$scope.input = text;
            $timeout(function () {
                AtD.checkCrossAJAX('preview',
                    {
                        success: function (errorCount) {
                            if (errorCount == 0) {
                                //alert("No writing errors were found");
                                HelperService.notify("No writing errors were found", "info");
                            }
                        },

                        error: function (reason) {
                            alert(reason);
                        }
                    });
            }, 1000);

        };
        $scope.enableEdit = function () {
            $scope.isEditing = true;
        };
    });


/*
 //Dummy text

 The purpoce of a spell checker is to check the text four spelling and typeing errors.
 The checker finds errors througout the text.

 When the spell checker finds an questionable word, it highlights it and suggests the mpst
 likely variants too replace the questionable word. You can select the variant and replace
 the wrrd or leave the word unanged.
 */
