This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var appDirectives = angular.module('appDirectives', []); | |
/** | |
* Add potential validation fields to form-control form elements (CakePHP 3 with Bootstrap) | |
* | |
* Requirement: $scope.errors contains option (validation) errors in default CakePHP 3 JSON response | |
*/ | |
appDirectives.directive('formControl', function($compile) { | |
return { | |
restrict: 'C', //Match all elements with form-control class |