Sha256: 2bc7ff2fca0c7e62f8fdcf976eb441f8db37972de2207afa87699f38eeef74e3
Contents?: true
Size: 1.12 KB
Versions: 34
Compression:
Stored size: 1.12 KB
Contents
var Text_ = angular.module("TextField", []); /* * <string-field></string-field> directive defination */ Text_.directive('textField', ["$filter", "gettext", function($filter, gettext) { function link(scope, element, attrs){ var ltr = is_ltr(); scope.element_id = "id_" + scope.field; scope.msg_element_id = "id_" + scope.field + "_msg"; if (scope.on_change !== undefined) { // Watch event changes scope.$watch("model", function(newv, oldv, $scope) { // TODO: maybe we should pass locals to $eval scope.$parent.$eval(scope.on_change); }, true); } } // Actual object of <string-field> directive return { templateUrl: template("fields/text/text"), replace: true, restrict: "E", transclude: true, scope: { cssClasses: '=cssClass', // fieldname field: "=fieldName", // Does this field is required required: "=", // Actual Angularjs ng-model model: '=' }, link: link }; }]);
Version data entries
34 entries across 34 versions & 1 rubygems