diff --git a/app.js b/app.js index 0bf9567..55d8358 100644 --- a/app.js +++ b/app.js @@ -56,6 +56,8 @@ myApp.controller('CtrlValidationDirective', ['$scope', 'validationService', func } } $scope.showValidationSummary = function () { + // the $translate call with promise is a hack to make sure translation locales are loaded + // you probably not have to do that in your local code $translate('SHOW_VALIDATION_SUMMARY').then(function() { $scope.displayValidationSummary = true; }); @@ -71,6 +73,8 @@ myApp.controller('Ctrl2forms', ['$scope', 'validationService', function ($scope, } } $scope.showValidationSummary = function () { + // the $translate call with promise is a hack to make sure translation locales are loaded + // you probably not have to do that in your local code $translate('SHOW_VALIDATION_SUMMARY').then(function() { $scope.displayValidationSummary = true; }); @@ -127,6 +131,8 @@ myApp.controller('CtrlValidationService', ['$scope', '$translate', 'validationSe }; $scope.showValidationSummary = function () { + // the $translate call with promise is a hack to make sure translation locales are loaded + // you probably not have to do that in your local code $translate('SHOW_VALIDATION_SUMMARY').then(function() { $scope.displayValidationSummary = true; }); diff --git a/readme.md b/readme.md index 3fa7869..35ffbbc 100644 --- a/readme.md +++ b/readme.md @@ -214,7 +214,7 @@ P.S. For real live sample, see the [live demo](#plunker) or download the Github ``` ## Global Options -To change default options, you can change the `$scope.$validationOptions`, for now only the `debounce` property is used but this might expend in the future. +To change default options, you can change the `$scope.$validationOptions`, for now only the `debounce` property is used but this might expand in the future. ```javascript myApp.controller('Ctrl', function ($scope) { $scope.$validationOptions = { debounce: 1500 }; // set the debounce globally